5 ms·
first word they use to justify using Pascal is that it's "modern". Gave a glimpse at the code source screenshot. No, that syntax is very much the past.
by mgaunard 3y ago
first word they use to justify using Pascal is that it's "modern".
Gave a glimpse at the code source screenshot. No, that syntax is very much the past.
- hgsgm 3y agoWhat makes syntax "modern"? Power matters more than style.
- mgaunard 3y agoAll imperative languages are essentially descended from ALGOL, but in the case of Pascal, it also kept its original syntax. Others have moved on.
- coldtea 3y agoYes they have "moved on". Which is why Alsol was "a language so far ahead of its time, that it was not only an improvement on its predecessors, but also on nearly all its successors.” — Tony Hoare.
- fuzztester 3y agoToo good quote :)
- aap_ 3y ago- no struct/record type - call by name instead of call by reference - no bitwise operators - probably a lot more, I'm not too familiar with the language The quote may have been closer to the truth at some point, but certainly not today. And while begin/end syntax may be a matter of taste I don't think it's coincidence it's not very common anymore.
- coldtea 3y agoOf course it's not true today [1]. That's a 70s or 80s quote. But still, "moving on" is not always "improving upon" was the point. [1] Well, mostly not true (the author has backed down somewhat, but the post is still illuminating as a comparison): http://cowlark.com/2009-11-15-go/ http://cowlark.com/2009-11-15-go/
- weinzierl 3y agoThe syntax is timeless, because it is much closer to math than B/BCPL/C heritage. It has its own issues but overall it is much better thought out than most other languages. Here is a comment I wrote a couple of months ago with more arguments for Pascal's syntax: "Yes, Rust does indeed and a long time before that it was Pascal. I really love Pascal's syntax, it makes a lot of sense when you approach it with a math background. - '=' is for equality only - assignment is ':=' which is the next best symbol you can find in math for that purpose - numeric data types are 'integer' and 'real', no single/double nonsense - 'functions' are for returning values, 'procedures' for side effects - Function and procedure definitions can be nested. I can't tell you what shock it was for me to discover that's not a thing in C. - There is a native 'set' type - It has product types (records) and sum types (variants). - Range Types! Love'em! You need a number between 0 and 360? You can easily express that in Pascal's type system. - Array indexing is your choice. Start at 0? Start at 1? Start at 100? It's up to you. - To switch between call-by-value and call-by-reference all you have to do is change your function/procedure signature. No changes at the call sites or inside the function/procedure body. Another bummer for me when I learned C. Pascal wasn't perfect but I really wish modern languages had syntax based on Wirth's languages instead of being based on BCPL, B and C." https://news.ycombinator.com/item?id=32983878 https://news.ycombinator.com/item?id=32983878
- troupo 3y agoIt's only "mathematical" if you chose very specific parts of the language from a very specific version of Pascal when looked at at a very specific angle. E.g. the argument falls apart immedately: - there's no assignment operator in maths - there are no procedures in maths, everything is a function - functions cannot be nested in maths (unless I'm mistaken) - types is maths, but Pascal uses a very narrowed down and dumbed down version of it etc. etc. Pascal is the way Pascal is because Wirth wanted the simplest possible language according to Wirth's own criteria that could be compiled in a single pass on a 1980s computer. It's the go [1] of its time. That is it. Both the syntax and Pascal's concept are severely outdated. It's a very good thing that modern languages never adopted Pascal's syntax and went for something that is actually usable. Hell, Erlang is a more mathematical and timeless syntax than Pascal, and it's a trivial langauge at it's core. [1] Can't find the actual text now, but there was a rationale by Rob Pike that go was amed at junior engineers, and needed to be simple.
- coldtea 3y agoThat could just be C-style prejudice.
- Toutouxc 3y agoWhy? I mostly write Ruby and the code in the screenshot doesn't offend me at all.
- pjmlp 3y agoThe syntax that has influenced Kotlin, Scala, Rust, Typescript, and the various ML. Yeah, really old fashion.
- lelanthran 3y agoThe syntax is a lot more readable than rust, or C++.