GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    meejah (meejah@mastodon.social)'s status on Tuesday, 05-Dec-2023 15:36:11 JST meejah meejah
    in reply to
    • Ivan Sagalaev :flag_wbw:
    • Armin Ronacher
    • David Zaslavsky

    @diazona @isagalaev @mitsuhiko I like that it's extremely readable. Looking "practically like pseudocode" was an example of just _how_ readable it is -- it makes great generic examples!

    For me, type-hints greatly decrease that for many, many readers. Only in larger projects do they start to make sense. I don't want a slower, less-parallel C++ -- I want something nicer to read and write!

    Also I don't believe the tale of them being "optional"...already, they're pretty non-optional.

    In conversation Tuesday, 05-Dec-2023 15:36:11 JST from mastodon.social permalink
    • Embed this notice
      phiofx (phiofx@hachyderm.io)'s status on Tuesday, 05-Dec-2023 15:36:11 JST phiofx phiofx
      in reply to
      • Ivan Sagalaev :flag_wbw:
      • Armin Ronacher
      • David Zaslavsky

      @meejah @diazona @isagalaev @mitsuhiko

      After observing the phenomenon for a few decades I am pretty convinced (but lack the expertise to prove) that long-running arguments about programming are not gratuitous bickering but involve real and complex cognitive issues.

      E.g. people will use expressions like "clean, readable, comprehensible" etc. code as if its an objective and isolated reality. Well, clearly it isn't. There is tons of context involved and maybe even neurophysiological differences.

      In conversation Tuesday, 05-Dec-2023 15:36:11 JST permalink
    • Embed this notice
      David Zaslavsky (diazona@techhub.social)'s status on Tuesday, 05-Dec-2023 15:36:12 JST David Zaslavsky David Zaslavsky
      in reply to
      • Ivan Sagalaev :flag_wbw:
      • Armin Ronacher

      @meejah @isagalaev @mitsuhiko I see. I'm not convinced though. Like, if the thing you like most about Python is that it looks like pseudocode, then that's fine, but you can still write Python that looks like pseudocode if you want to because type hints are optional. We don't write complex libraries and applications in pseudocode, though. (Or, we shouldn't) In those situations, static type checking is a big part of what elevates Python beyond pseudocode and makes it suitable for building those complex systems. (1/2)

      #Python

      In conversation Tuesday, 05-Dec-2023 15:36:12 JST permalink
    • Embed this notice
      meejah (meejah@mastodon.social)'s status on Tuesday, 05-Dec-2023 15:36:13 JST meejah meejah
      in reply to
      • Ivan Sagalaev :flag_wbw:
      • Armin Ronacher
      • David Zaslavsky

      @diazona @isagalaev @mitsuhiko So, I agree there are benefits to stronger typing. Most of the code I've produced is C++ ... but the very thing I like most about Python is being eroded by bolt-on type-hinting (that _still_ isn't very good, IMO, and very hard to read or type properly for remotely complex things).

      If you like real types, use Haskell or something ;)

      In conversation Tuesday, 05-Dec-2023 15:36:13 JST permalink
    • Embed this notice
      David Zaslavsky (diazona@techhub.social)'s status on Tuesday, 05-Dec-2023 15:36:15 JST David Zaslavsky David Zaslavsky
      in reply to
      • Ivan Sagalaev :flag_wbw:
      • Armin Ronacher

      @meejah @isagalaev @mitsuhiko ooh, them's fightin' words 😂

      But seriously though, I would say almost the exact opposite of this. The type system in #Python isn't perfect, sure, but for me it definitely helps readability and comprehension. It's useful enough that the ability to use a static type checker has probably been the single biggest productivity boost I've experienced in the entire time I've been using Python (or at least is on the short list for that title).

      In conversation Tuesday, 05-Dec-2023 15:36:15 JST permalink
    • Embed this notice
      meejah (meejah@mastodon.social)'s status on Tuesday, 05-Dec-2023 15:36:15 JST meejah meejah
      in reply to
      • Ivan Sagalaev :flag_wbw:
      • Armin Ronacher
      • David Zaslavsky

      @diazona @isagalaev @mitsuhiko Nearly into "re-hashing typing vs. untyped" arguments here, but what I'm getting at is that un-typed Python reads an awful lot like pseudo-code. Once you start putting type-hints on it, that all breaks down.

      So, I'm also agreeing with Armin on the fact that there _are_ benefits to static/strict typing but Python's isn't very good at the "advanced" aspects of that and also has the huge downside of "hard to read" (esp. for someone who's a programmer, but not Python)

      In conversation Tuesday, 05-Dec-2023 15:36:15 JST permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        down.so
        This domain may be for sale!
    • Embed this notice
      meejah (meejah@mastodon.social)'s status on Tuesday, 05-Dec-2023 15:36:15 JST meejah meejah
      in reply to
      • Ivan Sagalaev :flag_wbw:
      • Armin Ronacher
      • David Zaslavsky

      @diazona @isagalaev @mitsuhiko For example, the Ethereum 2 (or whatever, the proof-of-stake stuff) specifications literally used Python for their example / pseudo code (and even had unit-tests for them).

      Pretty hard to do that with type-hints involved.

      There's also a "Python3" level of extra work for library authors. I kind of dread the first ticket filed for "give me type-hints in txtorcon" -- because if one dep lacks type-hints, many benefits go away.

      In conversation Tuesday, 05-Dec-2023 15:36:15 JST permalink
    • Embed this notice
      meejah (meejah@mastodon.social)'s status on Tuesday, 05-Dec-2023 15:36:16 JST meejah meejah
      in reply to
      • Ivan Sagalaev :flag_wbw:
      • Armin Ronacher

      @isagalaev I 100% agree with what seems to be @mitsuhiko 's main point there: that trying to bolt typing onto Python is not a great idea, and has led to *far* less readable Python, overall.

      If you want a strongly-typed language, there are plenty to choose from.
      #python #haskell

      (I too don't want to re-hash all the argument for or against types, and I do know C++, Java and at least enough Haskell to be dangerous)

      In conversation Tuesday, 05-Dec-2023 15:36:16 JST permalink
    • Embed this notice
      Ivan Sagalaev :flag_wbw: (isagalaev@mastodon.social)'s status on Tuesday, 05-Dec-2023 15:36:17 JST Ivan Sagalaev :flag_wbw: Ivan Sagalaev :flag_wbw:

      Recent from Armin Ronacher is worth a read: https://lucumr.pocoo.org/2023/12/1/the-python-that-was/

      It strikes a note with me, although I don't agree on a couple of points.

      Like, "runtime errors flying left and right [..] because bad types were passed". No, most of the errors were and still are from wrong *values* being passed. Also mutable state, tight coupling and incomplete understanding of the domain. Unless your kind of programming is implementing some formal spec, types will only catch the most trivial errors.

      #python

      In conversation Tuesday, 05-Dec-2023 15:36:17 JST permalink

      Attachments


Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.