Recent

Author Topic: Looks like Java is getting RECORDS now  (Read 744 times)

ASBzone

  • Sr. Member
  • ****
  • Posts: 299
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
Looks like Java is getting RECORDS now
« on: January 21, 2020, 08:54:21 pm »
https://openjdk.java.net/jeps/359

No doubt, someone will soon suggest that it is high time for Object Pascal to get some "cool" Java feature, in light of this.

That person will not be me.     

(For the record, I'm not opposed to, or otherwise afraid of new functionality in tools or products.  I just think the reason should be a little better than, "But, mooooom!  EVERYONE's doing it!")
-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.7 r62618 / FPC v3.2.0-beta-r44160 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1909 (Build 18363.657)
Other Systems: Windows 10 Pro x64, Version 1909 or greater

syntonica

  • Full Member
  • ***
  • Posts: 120
Re: Looks like Java is getting RECORDS now
« Reply #1 on: January 21, 2020, 10:23:48 pm »
Immutable. Basically, named tuples, as they describe it. I was quite happy and productive in Java 5 & 6, but they just keep piling the junk on.  ::)  All they really need to do is to just copy C#.  :D

I can't think of any feature, cool or not, that I want/need/must have in Pascal.  I'd rather see Object Pascal Lite with all the cruft removed.

PascalDragon

  • Hero Member
  • *****
  • Posts: 973
  • Compiler Developer
Re: Looks like Java is getting RECORDS now
« Reply #2 on: January 21, 2020, 11:09:15 pm »
No doubt, someone will soon suggest that it is high time for Object Pascal to get some "cool" Java feature, in light of this.

Considering that Java likes to follow the hype train as much as Python and C# do: we're already getting such requests. :-X

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7941
Re: Looks like Java is getting RECORDS now
« Reply #3 on: January 22, 2020, 12:29:40 pm »
No doubt, someone will soon suggest that it is high time for Object Pascal to get some "cool" Java feature, in light of this.

Considering that Java likes to follow the hype train as much as Python and C# do: we're already getting such requests. :-X

Don't we already implement "sealed" ?  Basically these are immutable (sealed) records with a short declaration syntax.  But we don't have a runtime that needs sealed to optimize.

P.s. today's C# hype train goes in a different direction
p.s. ok, we probably only skip sealed. "implement" is maybe a bit too much :_)
« Last Edit: January 22, 2020, 02:11:34 pm by marcov »

Thaddy

  • Hero Member
  • *****
  • Posts: 9643
Re: Looks like Java is getting RECORDS now
« Reply #4 on: January 22, 2020, 02:05:58 pm »
@Marco
Funny to see Scott Hanselman mentioned: former Borland employee....again... :D ;D
« Last Edit: January 22, 2020, 02:07:41 pm by Thaddy »
I am more like donkey than shrek

PascalDragon

  • Hero Member
  • *****
  • Posts: 973
  • Compiler Developer
Re: Looks like Java is getting RECORDS now
« Reply #5 on: January 23, 2020, 09:21:10 am »
No doubt, someone will soon suggest that it is high time for Object Pascal to get some "cool" Java feature, in light of this.

Considering that Java likes to follow the hype train as much as Python and C# do: we're already getting such requests. :-X

Don't we already implement "sealed" ?  Basically these are immutable (sealed) records with a short declaration syntax.  But we don't have a runtime that needs sealed to optimize.

[snip]
p.s. ok, we probably only skip sealed. "implement" is maybe a bit too much :_)

sealed is for classes only and ensures that they can't be derived from. Also it was added due to Delphi compatibility not following any hype train.

P.s. today's C# hype train goes in a different direction

Fascinating! :o Not that we don't support Windows 3.11 either :P
« Last Edit: January 23, 2020, 09:23:37 am by PascalDragon »