News for hackers. Stuff that matters.
Re:Should Programming Languages Be Safe or Powerful? by sega_sai on Sunday December 15, 2024 @11:38AM (#42424366)
As mentioned by others, the article does not really tackle the question. But it is an interesting question, and I think it would be great to have a language that you could adjust the safety without major rewrites. I.e. various degrees of strict modes. At the times of LLMs, I wonder if anyone looked into some sort of sliding-scale transformation of code from safer, to easier to write. (although I am not sure there are good languages that are expressive enough for that).
Re:Should Programming Languages Be Safe or Powerful? by evoke4908 on Sunday December 15, 2024 @11:49AM (#42424425)
C# is the first thing to come to mind. If you so choose you can more or less inline C and trample all over memory, or you can write very strict, statically typed, safe code.
Re:Should Programming Languages Be Safe or Powerful? by HdS84 on Sunday December 15, 2024 @11:54AM (#42424453)
C# has unsafe, which extremely powerful. See ravens repo for heavy usage of that.

Otherwise python is also a good example of that. First start out in python. Not fast enough? Bring in python, which compiles down to c. Id that's not enough, drop to raw c.

Re:Should Programming Languages Be Safe or Powerful? by sega_sai on Sunday December 15, 2024 @03:16PM (#42425669)
I mostly use python, but switching from python to C is IMO too much work. What would be great if within one language, there was an access to much stricter/faster language. I.e. imagine writing a python function that is strictly typed, and does not use any of the python-isms with __methods that would be more verifiable and faster. I guess cython has a bit of that approach, but it's not that compatible with regular python.
Re:Should Programming Languages Be Safe or Powerful? by LectronPusher on Sunday December 15, 2024 @02:04PM (#42425248)
You would likely be interested in Jamie Brandon's work on the Zest language [1] which has planned "lax", "strict", and "kernel" modes for varying levels of performance/safety

[1]: https://www.scattered-thoughts.net/writing/zest-dialects-and...