Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 02 23:58
    @SethTisue banned @fakubishes:nerdsin.space
  • Dec 15 2021 05:01
    som-snytt commented #12516
  • Dec 15 2021 04:38
    SethTisue edited #1312
  • Dec 15 2021 04:38
    SethTisue opened #2273
  • Dec 15 2021 04:31
    jackkoenig opened #12516
  • Dec 15 2021 04:29
    SethTisue edited #1312
  • Dec 15 2021 04:28
    SethTisue edited #1312
  • Dec 15 2021 04:27
    SethTisue labeled #9831
  • Dec 15 2021 04:27
    scala-jenkins milestoned #9831
  • Dec 15 2021 04:27
    SethTisue labeled #9831
  • Dec 15 2021 04:27
    SethTisue opened #9831
  • Dec 15 2021 03:35
    som-snytt commented #11339
  • Dec 15 2021 03:27
    som-snytt labeled #12494
  • Dec 15 2021 03:07
    SethTisue edited #1312
  • Dec 15 2021 03:07
    SethTisue edited #1312
  • Dec 15 2021 03:05
    SethTisue edited #1312
  • Dec 15 2021 03:05
    SethTisue edited #1312
  • Dec 15 2021 03:05
    SethTisue edited #1312
  • Dec 15 2021 02:58
    SethTisue edited #1312
  • Dec 15 2021 02:58
    SethTisue synchronize #1312
Jose C
@jmcardon
dropped messages that require a gitter refrehs
trepidacious
@trepidacious
Maybe it's when they filter out the coin-mining :)
Rich
@Rich2
I think inheritance is a great idea, but primitive value types should not inherit.
Jose C
@jmcardon
I don't. There's other methods for code reuse
Fabio Labella
@SystemFw
@trepidacious Note that this is still relevant to scala: a lot of people for example expect to be able to resolve an implicit based on the class of something, whereas you can only do it on the type
Rich
@Rich2
Dumb data should not be confused with smart objects.
Jose C
@jmcardon
"smart objects" are, in practice, not smart but rather fickle and brittle
Fabio Labella
@SystemFw
so if you have a value of type Option and an instance for Some, you need to have the value to have type Some
OO means basically nothing, btw. And the only slightly coherent definition comes from languages like SmallTalk that have nothing to do with Java or Scala
Jose C
@jmcardon
Means nothing to you
Fabio Labella
@SystemFw
true :P
Jose C
@jmcardon
Loads of academics will debate with you on this.
Rich
@Rich2
Smart objects should be used for less numerous, larger, longer lasting pieces of data, while dumb data should be used for numerous, smaller, transient data.
Jose C
@jmcardon
but it's unreal how the OO part is never really debated
Martijn Hoekstra
@martijnhoekstra
subclassing and dynamic dispatch seems pretty core to OOP-in-practice
Jose C
@jmcardon
I'm fine with not holding state in "smart objects" at all
and the only design pattern I conciously use, and very occasionally, is the builder pattern
I have to write some java currently, and the design decisions made with pure OO as the codebase grows become awful.
coupled hierachies, overrides everywhere, config hidden in factories.
I'm half-waiting for @Ichoran to disagree with me here whenever he gets on, but from my experience in working with other people writing OO it just becomes a mudfight
like building a mud hut where you find some structural weakness somewhere and you patch it by slapping more mud into it.
trepidacious
@trepidacious
@SystemFw I disagree on OO meaning nothing, I think there is one useful syntactic thing that always seems to go with objects - being able to associate a function f with a type, and call f a b as a.f b
Rich
@Rich2
Is there even a single major game that's been written without mutation?
Jose C
@jmcardon
I Don't think so. FP isn't prevalent in game programming
trepidacious
@trepidacious
@SystemFw I'm probably wrong because I know so little about Haskell, but it seems for example like having a top-level function for accessing fields of a record type is really really annoying. Purescript seems to have decided to just have the dot notation for fields thing anyway.
Jose C
@jmcardon
there's also the duality that all the thunking in FP makes it hard to reason about performance
which is in particular why performance critical applications aren't written in haskell most of the time
haskell can be quite performant
but reasoning about it can definitely be difficult
@Richtype that said, games are terrible examples of this. Most game code is so bug-filled it's unreal
trepidacious
@trepidacious
Unreal is probably quite bug-free after all these years :)
Fabio Labella
@SystemFw
@trepidacious you are talking about records and namespacing. I don't think having those makes your language OO, I wouldn't call SML OO, for example
Jose C
@jmcardon
only took them 19 years
Fabio Labella
@SystemFw
btw, you can do a `f` b in Haskell
trepidacious
@trepidacious
@SystemFw For me though that's the useful bit of the grab bag of stuff that makes OO
Fabio Labella
@SystemFw
right, sure
trepidacious
@trepidacious
@SystemFw Yes but your "f" needs to be called something like noNotThatRecordWithANameThisOneName
Fabio Labella
@SystemFw
that's a specific wart of Haskell's record system
Rich
@Rich2
Show me the Functional equivalents of Civilisation, Rome Total War, Europa Universalis?
Fabio Labella
@SystemFw
it's not true in SML, purescript, or Frege, to name the firsts that spring to mind
trepidacious
@trepidacious
@SystemFw How do they handle it?
Jose C
@jmcardon
@Richtype games are not made in FP languages
or at least not many
Fabio Labella
@SystemFw
@trepidacious Purescript has first class records with . syntax. SML has records and modules. Frege looks like haskell but the data constructors are scoped
Rich
@Rich2
No but as there oodles of money to be made in games and fp makes things so easy why not?
Fabio Labella
@SystemFw
Garbage collection, for once
same reason why not a lot of games are written in Java either
(plus other reasons, but this one is a big one)
trepidacious
@trepidacious
@SystemFw There's minecraft
Martijn Hoekstra
@martijnhoekstra
many games also do horrible unspeakable things intertwining game logic with display and network stuff, due to the real time requirements. If you accept doing that, you lose most (all?) advantages of FP anyway.