4 ms·
Talking to myself, but ... I poked around with Logo a couple of years ago. It was invented in 1967. It is a dynamic language, and actually pretty good. I remem
by blippage 5y ago
Talking to myself, but ...
I poked around with Logo a couple of years ago. It was invented in 1967. It is a dynamic language, and actually pretty good. I remember thinking that there didn't appear to be any obvious deficiencies in the language.
Dylan is also a powerful language, heavily inspired from Lisp, but "without the toenail clippings." It tried it out, but the compiler seemed a bit flakey at the time, so I didn't pursue it much further.
Then there's Pascal. It's very fast to compile, I think chiefly because, unlike C, syntax isn't context-sensitive. Old Pascal suffered from daftness like strings having to be of pre-defined length. It got me to thinking that this might actually be a strength if you're programming microcontrollers. But anyway, this silly restriction was lifted. Pascal is a language that's very easy to get to grips with. C++ wins out over Pascal for application development because it has resource management, not just pointer management (which pascal doesn't have, either).
There's actually a project called Ultibo, which is a "unikernel" for the Raspberry Pi, written in Pascal. You can compile your own kernel using Lazarus. Getting up to speed was pretty straightforward. To mind it had a fatal flaw, though: it had a pre-emptive scheduler, and thus wasn't particularly useful as an RTOS.
What a lot of this illustrates is that anything that can be invented has been invented. Mostly, anyway. The number of programming languages has exploded over the last decade. What do the do - really do - that hasn't been done before?
Here's an idea ... if you want to create a new language, then take a working Pascal, and add your own ingredients. Its syntax is designed to be easily parseable, so you should have a good basis from which to work.
- pjmlp 5y agoObject Pascal also has resource managment, specially the later improvements added by Delphi, and RemObjects Pascal. Ada also has it since Ada 95. So what would this new Pascal like version bring to the table?
- blippage 5y ago"So what would this new Pascal like version bring to the table? " The kind of thing I had in mind is for creating Domain Specific Languages - more toy systems than any new earth-shattering paradigm. It's up to the tinkerer. Like, maybe someone wants to add coroutines to the language, for example. I had one idea in that I'd like to add a nicer way of expressing the parsing of data. Maybe a Cobol, but nicer. Or a Snobol, but in a more general-purpose language. Another idea is in the realm of microcontrollers. It could write start-up code for peripherals, and ensure its usage doesn't conflict. I'm not a Rust programmer, but I am aware that it is the kind of problem it addresses. BUT, the thing about compilers is that a function call is just a function call, it has no idea of intent. By extending the language, you can give the compiler that intent. So certain functions can have compile-time semantics as well as run-time semantics. You could probably achieve the same kind of thing with Lisp. Anything where one feels the need/desire to extend syntax, basically.
- pjmlp 5y agoYou have been able to use Pascal and Oberon for microcontrollers for years actually. https://www.mikroe.com/mikropascal https://www.mikroe.com/mikropascal https://www.astrobe.com/default.htm https://www.astrobe.com/default.htm