this post was submitted on 08 Feb 2025
374 points (97.9% liked)

Open Source

32777 readers
264 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] boonhet@lemm.ee 1 points 2 days ago (1 children)

Fair enough, but you COULD create a compiler for a a subset of the language without eval. There are so many dialects of Scheme, what's one without eval? Evals are very much evil anyway.

[โ€“] barsoap@lemm.ee 3 points 2 days ago

There's plenty of schemes that aren't fully standards-compliant but I don't think leaving out eval is common -- it's easy to implement and nothing about the standard says that it needs to run code fast.

Just wanted to point out that eval is the real static vs dynamic boundary. As to evil, sure, you shouldn't run just any code you find without having a sandbox in place, C's way to do the same thing is to call cc followed by dlopen, that's way scarier, which is why people just link in lua or something instead. I guess in you should probably include a wasm runtime instead of using dlopen.