Modern Pascal 开发痛点
问题概述
当前的 Object Pascal / Delphi 生态在语法、命名空间和现代化工具链方面存在不足,开发者希望能够更灵活地定义变量、减少命名空间污染,并能够轻松编译到 Web(HTML/JS)等新平台。同时,许多曾经的 Pascal 开发者对回归该语言表现出兴趣,但缺乏明确的迁移路径和示例项目。
痛点标签
- 当前只能在块作用域之外预先声明变量,缺乏按首次赋值即时声明的能力。
- 命名空间被遗留的前缀和约定所污染,导致代码可读性下降。
- 缺乏完整的、易于部署的 Web 编译示例和构建说明,阻碍了在 HTML/JavaScript 环境中的实际使用。
待验证问题
- 您是否愿意参与试用基于 FreePascal 的 Web 编译示例项目?
- 您最关注的语法改进是变量作用域还是命名空间整理?
- 您是否需要更详细的构建和部署文档来尝试将 Pascal 代码编译为 HTML/JS?
证据
原话 · @匿名
I used to have object pascal as my main language, and it has a lot in its favour. But when I go back to it I find two things drag it down. Pre definition of variables. I would like to be able to define variables on first assignment and scoped to the begin/end in which that happens, I don't think there is a good remaining argument to keep them above the statements. The namespace is cluttered with legacy usage, making the many years of advancement require odd. Combinations of prefixes. I still think there is a scope for a light fork that changes the name to distinguish it and starts the RTL afresh using the decades of hindsight and improvements.
原话 · @匿名
I bought Delphi ages ago, but never got very far with it, which I regret.I'd love to be able to take it up again, and this document looks very promising for that, esp. paired with:https://wiki.freepascal.org/pas2jswhich I now see is supported in Lazarus.If someone has an example graphical project which compiles to an HTML page w/ JavaScript using the above, I'd love to see it and a detailed set of build instructions and notes on installing the needed toolchain and deployment. (as a note, i'm currently working in flet.dev using Python which allowed me to get a small prototype up-and-running, but i'm still looking into self-hosting and doing something more complex)
原话 · @匿名
Photoshop 1.0 was written mostly in Object Pascal with some 68000 assembly language; source code is available:https://computerhistory.org/blog/adobe-photoshop-source-code...
免责声明:本卡片由 AI 从社区讨论中提炼,属于「痛点证据」,是需求分析与验证的起点,不等同于「已验证的市场需求」。AI 存在分析局限,关键决策前请打开上方原始讨论人工复核。