Live data from Hacker News

Modern Pascal is still in the race (2022)

blog.synopse.info

131–140 of 160 posts

Re: Modern Pascal is still in the race (2022)

#131
post #94

Earlier quoted context omitted.

I'm surprised that code folding has never really become good/popular enough to make all these things non-issues. Often it's only for named blocks like functions, and not for the really unhelpful bits like that conditional branch that is long, simple and deep, but really does not deserve spamming a namespace with an unhelpful identifier. And I've yet to see a deliberately short-lived folding to lessen the out of sight…

Code folding is phenomenal for understanding a codebase and I'm really surprised it wasn't utilized more.

Everybody getting burned by fold+forget exactly once would be my guess.

Perhaps new generation of editors ("post VSC") that experiments with non-uniform size could perhaps lead to some form of revival? Fold to "code minimap" excerpt instead of away. UI might want to consider cursor position in the leading whitespace for depth selection. In mouse terms, interact with the vertical line some editors display (not sure this could be helpful for keyboard knowitalls who'd select depth by repetition)

Or maybe this all exists but the shortcuts aren't sufficiently well known to reach my lowly knowledge levels, that's one of the more frustrating aspects of what-iffing editor UI.

Re: Modern Pascal is still in the race (2022)

#132

Earlier quoted context omitted.

I'm very much not a C programmer, but I've never understood why it seems far more common to write `float *foo` instead of `float* foo`. The "pointerness" is part of the type and to me the latter expresses that far more clearly.

Because the syntax is: {, , ...} ; The star is a type-deriving operator that is part of the , not part of the ! This declares two pointers to char: char *foo, *bar; This declares foo as a pointer to char, and bar as a char: char* foo, bar; We have created a trompe l'oeil by separating the * from the declarator to which it begins and attaching it to the specifier to which it doesn't.

>This declares foo as a pointer to char, and bar as a char:

  char* foo, bar;
So that's why I've had so many problems understanding C. I come from the Pascal world, where a type specification is straightforward.

Re: Modern Pascal is still in the race (2022)

#133
post #92

Earlier quoted context omitted.

Because it isn't - `float* foo, bar;` foo is a pointer, bar is not. (There were suggestions back in the 90s that to make C easier to parse for humans (and not-coincidentally simplify the compiler grammar) this should be `foo, bar: float*;` and your model of pointerness could actually be true. Never got much more traction than some "huh, that would be better, too bad we've been using this for 10 years already and will…

Which is why the convention is usually to not permit multiple declarations in one line. If you value your codebase anyway.

Declaring X,Y and Z on separate lines for a graphics routine would just be silly, they're all the same type.

Defensive programming that extreme reminds me of the behavior I learned to avoid pissing off my drunk dad.

Re: Modern Pascal is still in the race (2022)

#135
post #77

Earlier quoted context omitted.

I'd prefer to be a senior staff engineer, or whatever they call the technical leaders. The pay isn't quite as good as upper management, but it is equal to regular management and I get to do technical things. I just have to be careful not to direct others to make a big unmaintainable mess.

Yeah ageism wasn't always part of our profession. It was probably a side effect of rapid progress combined with the desire for wage suppression. It has let us move faster as old bad ideas lose their champions faster, but we then lose all the old good ideas too. Not every developer should turn into a manager. We don't need that many managers, and good managers are more rare than good developers in my experience. Havin…

On the other hand people smart enough to be engineers are smart enough to be in management so if that is your interest the world has a lot of people who for whatever reason can't won't do management. While managing other engineers is a way in, once you are in management you can do run a factory or a construction site and those often are places where workers cannot break into management.

Re: Modern Pascal is still in the race (2022)

#136

I programmed in Delphi since version 1 (before that of course Turbo Pascal) and I loved the system, a lot. The entire system is snappy, easy to use and beautifully designed. It was ways ahead of its time. Recently, I came back to a pet project: genetic algorithms. I wrote a library for it with polymorphism, generics and some other (actually not so complicated) stuffs in FPC/Lazarus and then I must notice that my prod…

> freight with many technical debts

"Freight" is a noun, not a verb. I can't guess the word you meant.

"Freighted"? (Weighed down.) "Fraught"? (Troubled by.)

The sad thing is that Pascal continued to evolve, but TP codified and fossilised it and that seems to be becoming a problem now.

Pascal evolved into Modula, which fairly soon became Modula-2 which is still around and enjoyed a moment in the sun.

(Modula-3 was someone else.)

Modula-2 evolved into Oberon, which is also still around.

Oberon evolved into Oberon 2, then was rebooted with Oberon 07, but which also led on to Active Oberon and Zennon.

Oberon+ is an attempt to re-unify them.

https://oberon-lang.github.io/

Re: Modern Pascal is still in the race (2022)

#137
post #117

As anecdote, my new older co-worker started his new embedded camera project also with Lazarus. A fast safe language, much easier and safer than C. Even SIMD tricks and OpenCV are possible for higher frame rates.

Lazarus is the IDE for FPC, the FreePascal Compiler, as I understand it. Lazarus itself isn't a language.

Re: Modern Pascal is still in the race (2022)

#139
post #92

Earlier quoted context omitted.

I'm very much not a C programmer, but I've never understood why it seems far more common to write `float *foo` instead of `float* foo`. The "pointerness" is part of the type and to me the latter expresses that far more clearly.

Because it isn't - `float* foo, bar;` foo is a pointer, bar is not. (There were suggestions back in the 90s that to make C easier to parse for humans (and not-coincidentally simplify the compiler grammar) this should be `foo, bar: float*;` and your model of pointerness could actually be true. Never got much more traction than some "huh, that would be better, too bad we've been using this for 10 years already and will…

Good news (kinda): C23 allows (and GCC has for a long long time allowed) you to write typeof(float *) foo, bar; and declare two pointers. Not that I’d advocate writing normal declarations that way, but at least now you can write macros (e.g. for allocation) that don’t choke on arbitrary type names.

Re: Modern Pascal is still in the race (2022)

#140

Earlier quoted context omitted.

Yeah ageism wasn't always part of our profession. It was probably a side effect of rapid progress combined with the desire for wage suppression. It has let us move faster as old bad ideas lose their champions faster, but we then lose all the old good ideas too. Not every developer should turn into a manager. We don't need that many managers, and good managers are more rare than good developers in my experience. Havin…

On the other hand people smart enough to be engineers are smart enough to be in management so if that is your interest the world has a lot of people who for whatever reason can't won't do management. While managing other engineers is a way in, once you are in management you can do run a factory or a construction site and those often are places where workers cannot break into management.

There are a lot of different types of intelligence. I have met many brilliant developers that made horrible managers. And I have met many developers that we joked they moved to management to protect the codebase, that turned out to be great managers. That is a good point though, that many jobs don't have paths into managing those same jobs.
Post reply on HN