Constructor Destructor syntax improvement #1039
Closed
lauler1
started this conversation in
Suggestions
Replies: 2 comments 2 replies
-
Adding additional keywords for constructor/destructor complicates the language more. I would have to memorize what Using |
Beta Was this translation helpful? Give feedback.
2 replies
-
I understand |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I'd like to propose a modification for enhancing the syntax in Cppfront, aimed purely at syntactic sugar. In line with the objective to simplify the language 10x, it seems to me that the current syntax for constructors and destructors may not fully align with this goal, particularly for those new to programming or coming from different programming backgrounds. I mean no criticism by this; it's merely a point for consideration. I'm not sure if this topic has been broached before.
The use of
out this
,inout this
, andmove this
within the context of overloading theoperator=
appears to me as potentially confusing and not entirely transparent regarding its purpose for many programmers. To enhance clarity, an alternative could be to adopt terms likeconstruct this
,assign this
, anddestruct this
respectively.Thank you for your work.
Beta Was this translation helpful? Give feedback.
All reactions