News for hackers. Stuff that matters.
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by foldr on Monday January 22, 2024 @05:05AM (#39087963)
The poster is talking about the subset of modern languages that have GC. They're not suggesting that only modern languages have GC.
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by pjmlp on Monday January 22, 2024 @08:04AM (#39089060)
> "Another big reason is the lack of value types in languages like Java. Modern languages with a GC tend to have those, and where it makes sense to use them they help, a lot."

Might be interpreted as older languages with GC did not had value types, which is bluntly false, going back to 1970's.

My remark was to make clear this isn't something new and modern, rather a design mistake in languages like Java, that is now trying really hard to fix it, while others designed after it (like C#), thankfully didn't follow the same trap.

How modern a 2001 language (C#), using ideas from Mesa/Cedar (1985), is an exercise in the semantics of "modern".

Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by foldr on Monday January 22, 2024 @11:00AM (#39090889)
>Might be interpreted as older languages with GC did not had value types, which is bluntly false, going back to 1970's.

Ok, but you included Common Lisp in your list, which doesn't really have value types. (E.g. you cannot make an unboxed array of structs.)

Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by pjmlp on Monday January 22, 2024 @11:16AM (#39091189)
No, but you can have an array of primitive values, instead of an array of pointers.
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by foldr on Monday January 22, 2024 @11:21AM (#39091258)
You can do that in Java too!
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by pjmlp on Monday January 22, 2024 @11:25AM (#39091319)
Take your brownies, I guess, that wasn't my point.

As if me mis-remembering Common Lisp capabilities, invalidates the rest regarding "modern" GC languages.

Here is an array of structs in Oberon, 1987,

    TYPE
      Point = RECORD
        x, y : INTEGER
      END;

      Triagle = RECORD
        v1, v2, v3: Point
      END;

      Data = ARRAY 100 OF Triagle; (* static sized *)

      DynData  = ARRAY OF Triagle; (* dynamically sized *)

    VAR
       dynData : DynData; (* Allocated via NEW(dynData, elems)*)
Re:Boehm-Demers-Weiser conservative C/C++ Garbage Collector by foldr on Monday January 22, 2024 @11:42AM (#39091564)
No, it doesn't invalidate the rest of your comment. It just made it harder to figure out what point you were making in your original post (i.e. what the this referred to).

There's a little bit of irony here in how you react to people picking at details in your own posts, when your original post is precisely the same kind of pedantry!