I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
This entire post is Semantic Seasoning, which means it's about changing the way things look without changing their functionality, and it's really salty.
I think the phrase "semantic sugar" exists to let use know that something only exists for that reason. If someone introduces a way of abbreviating the language without changing its functionality, that's SS. It's bad because it's not backwards-compatible and doesn't add anything new.
Your example of += is semantic sugar, but because it's been in languages for donkeys' years it's ok. If you were to take a language without that symbol (Python?) then introduced a mod to allow it, that'd make a lot of people happy. But it would require everyone else to use the same mod (whether it be a library or a change to the interpreter) and that mod would be seen as unnecessary by a lot of people.
I think that's the difference. SS is a problem when it makes unnecessary things necessary.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This entire post is Semantic Seasoning, which means it's about changing the way things look without changing their functionality, and it's really salty.
I think the phrase "semantic sugar" exists to let use know that something only exists for that reason. If someone introduces a way of abbreviating the language without changing its functionality, that's SS. It's bad because it's not backwards-compatible and doesn't add anything new.
Your example of
+=
is semantic sugar, but because it's been in languages for donkeys' years it's ok. If you were to take a language without that symbol (Python?) then introduced a mod to allow it, that'd make a lot of people happy. But it would require everyone else to use the same mod (whether it be a library or a change to the interpreter) and that mod would be seen as unnecessary by a lot of people.I think that's the difference. SS is a problem when it makes unnecessary things necessary.