• JackoKomm@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    EcmaScript. It Was planned with scheme in mind and you can still feel it today. It is funny that many things people dislike about it have it’s origin in scheme. One of the problems is that it doesn’t look like a LISP language and people just see it like a Java like language. If they would familiarize themselves with the concepts, they would probably get the idea behind the language.

  • green_tory@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Janet.

    It’s not a lisp or lisp dialect because it is not built around lists. It doesn’t even have cons cells.

    • scheurneus@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      I don’t know that much about Lisp, but I don’t understand this obsession with cons cells and (linked) lists. A cons cell is nothing more than a 2-tuple, which is equivalent to a 2-element array (and Janet has arrays!).

      From a programmer’s perspective the difference between an array and a list is also, I would say, very minor. So why is using linked lists instead of arrays a critical part of a Lisp?

      • kagevf@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        I think it’s because it’s more natural to represent a tree with a linked list. The body of Lisp code is also a tree - some even say an “abstract syntax tree”, but that’s not fully accurate - which facilitates the syntax manipulation done with macros.

        • green_tory@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          10 months ago

          Not just trees; any operation that involves mutating or manipulating list-like structures is more efficient than arrays.

          Some examples:

          Removing an element is delinking a single cons cell, vs either copying to a new array or shuffling all subsequent elements left. It also doesn’t break any references to list cells, even the removed cell.

          Slicing, at minimum, only requires having the cons cell at the new head of the list; rather than either a special datastructure to represent a slice, or copying to a new array.

          Filtering means pulling cons cells from a nursery on an ad-hoc basis, using them to collect filtered elements into a new list of unknown length. With an array, you need a pre-allocated buffer that either sets a limit on the size of the filtered set, or requires reallocation on resize with a O(n) copy.

          Just, in general, you can be a lot more relaxed with flinging data around lists without having to think about the algorithmic overhead of allocating, reallocating, copying and shuffling arrays.

      • daybreak-gibby@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        I am pretty late to the Lisp world myself, but this cons obsession doesn’t make any sense to me either. I think it is useless gatekeeping.

        My personal definition is if someone saw it would they call it a Lisp? Janet is definitely closer to a Lisp, than an ML or C-styled language. Therefore, it is a lisp.

      • green_tory@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        If you were to use Janet arrays as one uses lists in a lisp, then you’d quickly find yourself in a performance tar pit. Arrays would be frequently allocated, freed, resized, copied, and so forth.

        A linked list built around cons cells allows slicing, augmentation, filtering, and so on almost for free.

        That means writing in a proper lisp lends itself towards almost thoughtlessly mutating and manipulating lists; whereas writing code in Janet means spending more care about what you’re doing with the data structure.

  • Nondv@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I mean, without any definitions I’d say JavaScript.

    It’s kinda like Scheme: first class functions, vars and functions share namespace, etc

  • Laugarhraun@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Many modern languages share some Lisp features. Ruby and Python come to mind.

    In the vein of “the world is not what you think” but very different from Lisp I’d say Forth. Implementing a Forth is a fun exercise.

  • jwezorek@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    i think for something to be like Lisp without actually being Lisp it would need to be functional and feature homoiconicity, or at least something like homoiconicity.The only language like that, that many people would not call a Lisp anyway, is Julia.

    EDIT: wikipedia says Elixir too but I don’t really know anything about Elixir…