Hacker Newsnew | past | comments | ask | show | jobs | submit | gnatmud8's commentslogin

i also wonder about this concept; is there a programming language that has this behavior?


Ada, Nim, Pascal. I think C++ also offers it with a specific syntax.

Rust also offers it, but you need to specify it on the call side as well.


Fortran can do "in out" arguments to subroutines also.


if only people knew how easy it is to implement the standard library and make it way simpler than what is usually provided, everyone would be writing their own standard libraries; you can implement one with string manipulation, files, memory management, threading, and basic timing, in less than 1000loc of c code, as i have done before, and the biggest parts by far were console printing and filesystem stuff, and it's mostly because of windows utf-16 conversion nonsense


if you depend on more, you are capping what you can build to only what you can manage to get working and integrate, plus you also lose control over the code; for me personally, it's a lot easier to write a complicated algorithm, than it is to figure out a complex build system for a random library in the wild (with few exceptions like miniaudio); and it's especially worth it, because when i understand the problem, i can usually define a way better api for my usecase than any library writer can


package.json is a convention, not a language definition, hence package managers may implement "package" management differently; in reality conventions are followed, until they aren't, and that's where hell begins (if something can be abused - it will be); go and odin define package in the language itself as a folder containing source files, and they mitigate many management issues by just having a good standard library, so you wouldn't need as many packages to begin with;


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: