Recent

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

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
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.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

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: 5444
  • 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

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
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: 14159
  • Probably until I exterminate Putin.
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 »
Specialize a type, not a var.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5444
  • 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 »

 

TinyPortal © 2005-2018