News for hackers. Stuff that matters.
Re:Energy Efficiency Across Programming Languages by mamcx on Thursday September 14, 2017 @03:18PM (#15251570)
> 1. Pascal

Pascal is a "hidden" gem in the area of languages. Sadly not enough pus for it, but imagine if it have the push that other languages have...

Re:Energy Efficiency Across Programming Languages by open-source-ux on Thursday September 14, 2017 @03:52PM (#15251918)
"Pascal is a "hidden" gem in the area of languages"

I agree. Programmers won't look at it because they perceive it to be old and out-of-date. But the language hasn't stood still. It's a fast, low-memory language. FreePascal with the Lazarus IDE is one of the best cross-platform development toolkits for building native desktop apps.

Sadly a lot of programmers can never see beyond the verbose (but readable) syntax.

Re:Energy Efficiency Across Programming Languages by Kamgunz on Thursday September 14, 2017 @07:33PM (#15253377)
Maybe somebody needs to create a more palatable language, that'll transpile (I know, I know, compile) into pascal?
Re:Energy Efficiency Across Programming Languages by mamcx on Thursday September 14, 2017 @08:22PM (#15253593)
This guys made a pascal-like language:

http://www.elementscompiler.com/elements/oxygene/

Exist various dialects of pascal (Modula, Oberon, etc) so is not something so far in the wind.

But if you lose too much of the syntax you remove part of the charm.

Re:Energy Efficiency Across Programming Languages by fasquoika on Thursday September 14, 2017 @09:34PM (#15253896)
Palatable how? Pascal's syntax is not especially different from that of most scripting languages
Re:Energy Efficiency Across Programming Languages by andrewflnr on Thursday September 14, 2017 @10:24PM (#15254104)
Every time I look at the syntax, it feels really verbose. IIRC some dialects require all caps or initial caps on keywords; at any rate that's how most examples are shown, and it's rather off-putting. Superficial, I know, but I'm probably not the only one.
Re:Energy Efficiency Across Programming Languages by fasquoika on Friday September 15, 2017 @11:19AM (#15257843)
I don't know about other implementations but FreePascal is completely case insensitive. Identifiers are actually treated the same if the only difference is case. I don't particularly like this, but I've never seen it actually be an issue
Re:Energy Efficiency Across Programming Languages by pjmlp on Friday September 15, 2017 @04:16AM (#15255514)
That was what I was looking for in Go, but they seem to have other goals in mind.

Failing that there is always Ada, .NET Native, Kotlin Native, D,...

Re:Energy Efficiency Across Programming Languages by psyc on Thursday September 14, 2017 @06:40PM (#15253080)
When I started programming in the early 90's, I remember Pascal being a serious contender, with C vs Pascal compilers being a pretty evenly matched contest.
Re:Energy Efficiency Across Programming Languages by mac01021 on Thursday September 14, 2017 @09:11PM (#15253817)
But why should it's memory utilization be so much lower?

Pascal and C give the programmer basically the same control over memory layout, no?

Re:Energy Efficiency Across Programming Languages by subwayclub on Friday September 15, 2017 @01:10AM (#15254803)
Basically, C's semantics assume too little - everything is a primitive type or a pointer dressed up to look like something else. Pascal has a stronger notion of types and this allows for additional automatic optimization where they're relevant - memory layout just happens to be one such area.
Re:Energy Efficiency Across Programming Languages by addHocker on Friday September 15, 2017 @05:45AM (#15255834)
I miss the ability to pair structures as "antagonistic" - aka if one exists the other is not, thus allowing for unions of various datatypes who guarantee that if they exist- the shared memory they reside in is theirs and theirs alone.
Re:Energy Efficiency Across Programming Languages by dmytrish on Friday September 15, 2017 @05:34AM (#15255788)
Just a wild guess: Pascal may use tightly packed structures without alignment by default?
Re:Energy Efficiency Across Programming Languages by nine_k on Thursday September 14, 2017 @11:27PM (#15254374)
Much of Pascal (or, rather, Modula-2 and Oberon) is revived inside Go.
Re:Energy Efficiency Across Programming Languages by dom96 on Friday September 15, 2017 @04:22AM (#15255537)
And even more so is revived in Nim.
Re:Energy Efficiency Across Programming Languages by continuational on Friday September 15, 2017 @02:50AM (#15255147)
What parts of Pascal do you recognize in Go?
Re:Energy Efficiency Across Programming Languages by pjmlp on Friday September 15, 2017 @04:14AM (#15255507)
The id type way instead of type id.

The way methods are attached to types appeared first in Oberon-2.

Type assertions are similar to Oberon.

The unsafe package idea is similar to SYSTEM in Oberon or Pascal.

The stronger type semantics forcing explicit casts.

Re:Energy Efficiency Across Programming Languages by agumonkey on Thursday September 14, 2017 @03:41PM (#15251801)
Now I need to finish my lisp.pas
Re:Energy Efficiency Across Programming Languages by mamcx on Thursday September 14, 2017 @06:48PM (#15253118)
You will like this:

https://github.com/kanaka/mal

(Have implementation in pascal!)

Re:Energy Efficiency Across Programming Languages by agumonkey on Thursday September 14, 2017 @08:08PM (#15253530)
I try to not look at it to not steal ideas :)
Re:Energy Efficiency Across Programming Languages by CoreXtreme on Thursday September 14, 2017 @05:04PM (#15252496)
Ruby also has gem.