News for hackers. Stuff that matters.
Re:Bog – small, strongly typed, embeddable language by detrites on Sunday January 29, 2023 @11:50AM (#34569921)
Love how this language is explained with code only.
Re:Bog – small, strongly typed, embeddable language by dawsoneliasen on Sunday January 29, 2023 @12:02PM (#34570054)
Is it just me or is that a terrible “hello world”? I get that they’re trying to illustrate a few features but the whole point of hello world is that it is the absolute most simple program. Why put the string world into a variable named world just to show that you can insert a variable into a string? It looks so confusing.
Re:Bog – small, strongly typed, embeddable language by buttspelunker on Sunday January 29, 2023 @01:07PM (#34570828)
I read that as "Yes, Bog does formatted strings", and appreciate the density.
Re:Bog – small, strongly typed, embeddable language by layer8 on Sunday January 29, 2023 @02:35PM (#34571819)
The purpose of a Hello World, however, is not to showcase language features, it’s to provide a minimal program that produces output, to test that your dev environment is working properly, and for you to learn how to operate it. Adding any unnecessary complications to it only adds further sources of error.
Re:Bog – small, strongly typed, embeddable language by bsaul on Sunday January 29, 2023 @04:43PM (#34573071)
Do you think real people will get confused and think the only way to write hello world in bog is using a variable ?

Or do you think most people will automatically adjust and think "hello world in itself doesn't show much, so the author decided to include something more informative and keep call that hello world" ?

Re:Bog – small, strongly typed, embeddable language by layer8 on Sunday January 29, 2023 @04:47PM (#34573104)
I think he shouldn‘t have called it a Hello World if its purpose is to showcase a language feature instead of serving as an actual Hello World.
Re:Bog – small, strongly typed, embeddable language by jadodev on Tuesday January 31, 2023 @12:38AM (#34591613)
Obviously the examples in a README for a programming language are going to showcase said language's features.
Re:Bog – small, strongly typed, embeddable language by _kst_ on Sunday January 29, 2023 @09:00PM (#34575007)
That's actually something that struck me negatively (about the README, not about the language).

Sample code is great, but I'd be happier with a README that says something about the language (and, to a lesser extent, about its implementation).

Apparently Bog is based on Zig, but I didn't learn that until after reading about 80% of the README -- and since I'm not particularly familiar with Zig, I don't quite know what to do with that information.

Probably the author had a narrower audience in mind when writing the README.