4 ms·
In my opinion, Odin is the most Pascal-like language with C-like syntax.
by eterps 2y ago
In my opinion, Odin is the most Pascal-like language with C-like syntax.
- Rochus 2y agoWhy not directly use a modern Pascal? What's the advantage of Odin in this respect (besides the C-like syntax)?
- bobajeff 2y agoLike what? The only one I can think of is Ada.
- Rochus 2y agoFreePascal, Delphi, Oxygene, Oberon+
- masfoobar 2y agoWhile it has been a number of years since I last used Pascal (Delphi 5 or Turbo Pascal before that) -- I do like the language but I find the code syntax to be bloated at times. Maybe better to say harder on the eye when looking at large source code compared to C. Of course - modern Pascal (Free Pascal, Delphi, etc) might have evolved a lot since. // C void some_func(int a) { int b = a + 10; printf("hello %d\n", b); } { Pascal - Going by memory, so might be a tad wrong } procedure SomeFunc(a : Integer) var b : Integer; begin b := a + 10; WriteLn('hello ', b); end; I have been playing around with Odin for a little while, now. It may have been inspired by Pascal in a number of ways but it certainly isn't as cumbersome to write. I am liking the syntax much more. // Odin some_func :: proc(a : i32) { b := a + 10 fmt.println("hello ", b) }