Earlier quoted context omitted.
lambdas are a kludge? Really? You prefer creating one-method anonymous classes instead?
I think they meant in terms of how the feature was implemented, not the feature itself.
Why use Pascal?
181–190 of 516 posts
Re: Why use Pascal?
#182Earlier quoted context omitted.
They are pretty much everywhere when statically allocated.
well, not in c.
At least I'm seeing: `array type 'int[3]'` in messages when I tried to do something wrong with it quick to get an error message (using llvm), maybe that's a compiler specific thing.
Re: Why use Pascal?
#183Re: Why use Pascal?
#184Re: Why use Pascal?
#185Delphi – why won't it die? (2013)
Re: Why use Pascal?
#186Earlier quoted context omitted.
well, not in c.
I believe they are in C, but arrays degrade to pointers when you look at them wrong, and _those_ don't have length as part of their type. At least I'm seeing: `array type 'int[3]'` in messages when I tried to do something wrong with it quick to get an error message (using llvm), maybe that's a compiler specific thing.
no, almost whenever you look at them. it is very hard to carry around the size of an array in C.
> At least I'm seeing: `array type 'int[3]'` in messages when I tried to do something wrong with it quick to get an error message (using llvm), maybe that's a compiler specific thing.
post some code that illustrates what you are talking about
Re: Why use Pascal?
#187Re: Why use Pascal?
#188Unless you want a C++ with a different syntax and less features then there's no reason to learn Pascal in 2023. And the syntax is much worse, you can't even declare variables in the middle of a function it has to go before the function. This slows you down from real work (art code comes later). It also makes worse code as declaring near the usage point makes code more clear.
Yes you can:
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Inli...
Re: Why use Pascal?
#189I used Delph professionaly for several years in the 90s, and liked it, but really got tired with Borland (and subsequent owners) mis-managing the product and the language, as did Anders Hejlsberg, who left Borland for Microsoft, where he created C# - IMHO a much better language & architecture to invest your time in.
Re: Why use Pascal?
#190Unless you want a C++ with a different syntax and less features then there's no reason to learn Pascal in 2023. And the syntax is much worse, you can't even declare variables in the middle of a function it has to go before the function. This slows you down from real work (art code comes later). It also makes worse code as declaring near the usage point makes code more clear.
Can’t speak about Object Pascal, but the old Pascal was objectively better than C. You can like or dislike the differences in syntax, but Pascal’s type system was pretty solid which can’t be said about C
Meaning: you used sensible types (and had sensible libraries) and once the obvious compile-time errors were fixed, there would be zero bugs found in testing or in live!
I like the flexibility of python, but I know that every substantial program has untested pathways that will fail when they come to be exercised :(