Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add semantic naming to variables #472

Merged
merged 4 commits into from
Nov 25, 2023
Merged

add semantic naming to variables #472

merged 4 commits into from
Nov 25, 2023

Conversation

nonchris
Copy link
Contributor

@nonchris nonchris commented Nov 9, 2023

As a proud investor of the first hour, I'm fully invested to make the most of my 0,69 £.
This kept me on the edge of my seat day and night - until now!
Now I'm confident that I found the *perfect* contribution to the greatest programming language ever created by mankind.
So I'd love ti present add my humble contribution to DreamBerds specifications.

introducing: "Semantic Naming" of variables!

I guess the commit itself speaks volumes.
More than my words could ever tell.
please have a look yourself and consider this as my contribution to mankind.

(now as a signed-commit version)

@TodePond
Copy link
Owner

TodePond commented Nov 9, 2023

Ok this is actually really good. I feel like it could go harder on the hungarian notation naming insanity. Love those one letter prefixes like bBool, iInt, etc...

I think the description could be more to the point, like one sentence only. DreamBerd supports hungarian notation or something 🤔

(just thinking aloud)

@nonchris
Copy link
Contributor Author

nonchris commented Nov 9, 2023

hehe, thanks :D
uh, actually never heard of that convention. just googled it - I see what you mean.
if we lean to much in it it might reach a point where you could even argue that it's actually useful - and I guess we don't want that here, right? ^^'

and yeah, we could probably shorten the description. I'm not that good at keeping it short (:

change examples and shorten description of semantic naming
@nonchris
Copy link
Contributor Author

nonchris commented Nov 9, 2023

I made some changes.
now we've got Hungarian notation in the examples (makes the example even more confusing) and I cut one sentence.
The readers will notice the usage of !and ? without explanation :)

and one example more
@nonchris
Copy link
Contributor Author

@TodePond what do you think 'bout these changes?

@TodePond TodePond self-requested a review November 11, 2023 14:16
Copy link
Owner

@TodePond TodePond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would benefit from simplifying a lot. It's a funny joke on its own so any extra text distracts from it.

I think that ambiguity of whether it makes any difference would be good. It lets people use their imagination about what it does.

I also think it should be moved later on. Definitely after the "types" section. Maybe way later than that.

Here's a suggested edit:

Semantic naming

DreamBerd supports semantic naming.

const const sName = "Lu"!
const const iAge = 29!
const const bHappy = true!

New for 2023: You can now make globals.

const const g_fScore = 4.5!

@TodePond TodePond merged commit acd8f3d into TodePond:main Nov 25, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants