6

So I'm not sure if I should be happy or sad about this feature on python 3.7

Comments
  • 0
    it helps with the useless bpilerplate code.
  • 0
    @stop well technically boilerplate code is useful as it’s needed in most projects. But I know what you mean. Just had a moment of wanting to be that person.
  • 0
    Do you know of other languages with these concept of data classes besides kotlin and python ??
  • 0
    @CorruptComputer lol, classes are not the new feature
  • 1
    @voodoo14 it seems to be based off ADTs (algebraic data types) and record types in languages like F# and Haskell.
  • 0
    @CorruptComputer
    From my understanding they added something to make creating classes easier.

    How?
    Looks like they are omitting some methods which are standard. So it should make things simpler and cleaner.
  • 0
    @CorruptComputer basically, you can now define class fields just like you would in most OO languages. It used to be that you had to create them in the constructor, which wasn't very readable.
  • 0
  • 1
Add Comment