Meeting Seed7 (genodians.org)
from strlcpy@lemmy.sdf.org to programming@programming.dev on 05 Jan 10:52
https://lemmy.sdf.org/post/48521172

A strongly typed programming language. Interpreted and compiled. Performance in the ballpark of C. Memory-safe since decades. I feel embarrased to admit that I had been totally unaware of Seed7 until mere two months ago.

#programming

threaded - newest

coherent_domain@infosec.pub on 05 Jan 15:00 next collapse

I have heard way too many “performance in the ballpark of C”, most of the time it means in some cherry-picked example it is slightly slower than C, and most program is 20-50 times slower.

The language design honestly remind me of the old PHP: uses hashtable and array as primitive data structures, and free memory at the end of a function to achieve memory safety.

It seems quite unbelievable to me that it is gonna have C-like performance, since hashtable is usually quite slow compared to even heap access (direct stack allocation, of course, is the fastest); but I would be happy to be proven wrong.

anton@lemmy.blahaj.zone on 06 Jan 00:17 collapse

Memory-safe since decades.

It’s just reference counting with some common sense optimisations. From the website I can’t quite make out wether they disallow cyclic data structures or just leek them, but I’m guessing it’s the latter.

Also the only thing worse than one-indexed arrays (the default) is allowing user defined array start.

I feel embarrased to admit that I had been totally unaware of Seed7 until mere two months ago.

Don’t be, there are so many out there, no need to be embarrassed for not knowing a language that prides itself on lot having fortran style line length limit.
After slogging through vhdl, I personally will not voluntarily use a language that forces me to write out stuff like

      end if;
    end for;
  end func;

when three } would work just as well.
Similar deal with

const proc: main is func
  local
    # local variables go here 
  begin
    # finally, the actual code can begin

where proc means func void so essentially const func void main is func begin. Just default to const, remove the redundant funcs and allow locals to go where they are used, not all up front, even when they are only used in one branch.