What practically annoys you on a regular basis in programming languages?

Started by
70 comments, last by Dawoodoz 4 years, 6 months ago
1 hour ago, Wyrframe said:

That's... not what I said. What I said was, your syntax is wrong, and your description of how you think the language and its compilers works, is wrong. I then illustrated how you could get the access to the "T" used in parameterization by giving it an explicit name, by using the type system the way it actually works.

 

Reading back to @l0calh05t's description, I think what you're talking about is this "explicit [self]"...



class MyClass(object):
    def __init__(self, x, y):
        self.x = x
        self.y = y

 

To which my counterpoint is, which of these functions has a `this` implicit variable?



int foo::bar(void) { return 42; }

int foo_bar(void) { return 42; }

To wit: you can't declare non-member functions while defining the interface of a member-possessing structure, so don't try... and when not defining the interface of such structures, you have to explicitly name the type to which you are defining a member by using :: syntax. So where is the ambiguity? Either the function declaration is inside a structure definition, or it has a :: in the name.

If you try writing a full compiler with templates and class inheritance, you will understand the paradox I already mentioned about the corner cases you didn't cover. End of discussion.

This topic is closed to new replies.

Advertisement