18

!rant

YES YES YES YES YES

GIMME SOME OF THOSE TYPED PROPERTIES <3

When I first started trying out Java I hated that I had to type every variable I declared, coming from a javascript and php background

nowadays I can't live without them, it feels so safe and secure <3 <3 <3

Comments
  • 7
    I love how everybody hates on Java and then praises PHP for getting closer and closer to copying everything from it
  • 1
    @12bitfloat Even if PHP copies all it will still be better than Java just because its not so verbose and you can have different outputs. And just in case it needs saying, Type safety is not a concept Java invented :)

    The only thing I would love is if PHP would improve on this and allow for type mixing and all that nice type things from Typescript :)
  • 3
    @arekxv What sorta drugs are you on?
  • 1
    Typed properties are awesome and I can't wait till 7.4 is stable. Why are you adding property names in phpdocs btw?
  • 0
    @gronostaj PHPStorm always suggests it and I've been doing it automatically ever since I started using it
  • 3
    A var when you are too lazy to write out the type is fine. C# has no issues keeping track of the type anyway.
  • 0
    @p100sch I prefer always defining the type though, then I don't have to keep the type in my memory while debugging
  • 4
    @p100sch And f# is just godlike in that regard
  • 2
    Right?!! Strong typing is what control feels like.
  • 1
    Totally agree, typed dynamic languages are seriously handy.
    The only thing I would have preferred was to have types on the right, but I understand that's very subjective
  • 1
    What color theme is this?
  • 0
    @Kyu96 One dark with 🏳️‍🌈 brackets
  • 1
    @alexbrooklyn Huh, for me it autogenerates names on variables, but on properties it doesn't. Maybe there's a setting for that...
  • 1
    omg i feel you. i thought that making software with c++ and sdl2 was hard, then switched to lua and love2d where there are types of values, not variables. just now i feel how much i miss my typed variables... (but still, lua is pretty cool tbh, works great with the c api)
  • 2
    Okké 🙂🙂. Thank you ?
    @alexbrooklyn
  • 1
    @dUcKtYpEd I don't know about that, chief...
Add Comment