Jump to content

Kryvich

Members
  • Content Count

    279
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Kryvich

  1. Kryvich

    We need a Delphi Language Server

    For me Delphi 10.2 IDE is stable and very resposive. I tried Oxygene in Visual Studio, it was noticeably slower on my computer.
  2. Kryvich

    Inline Variables Coming in 10.3

    I just noticed that these innovations will make the functional elements in Delphi code more compact and easy to understand. And if we talk about functional programming, please look at this article by Joel Spolsky ("Can Your Programming Language Do This?"). We can write code in the same style, and after 10.3 we will be able to remove unnecessary syntax elements, while maintaining strong typing of Delphi language.
  3. Kryvich

    Inline Variables Coming in 10.3

    OK, let's call it functional programming elements in an imperative language. In 10.3 and subsequent releases these elements will be even more.
  4. Kryvich

    Save some vertical space?

    I am for any changes that will make the interface less cluttered and more compact. If this can be achieved without additional plug-ins - it will be great.
  5. Kryvich

    Inline Variables Coming in 10.3

    Another observation. From the very beginning, we had this method of declaring procedures and functions: procedure procedureName(parameterList); localDeclarations; begin statements end; The reserved word begin marks the beginning of the procedure body. But starting from 10.3 local variables can be declared directly in the procedure body. Therefore, there is no need to save begin for procedures and functions: procedure procedureName(parameterList); localDeclarations; statements end;
  6. Kryvich

    Inline Variables Coming in 10.3

    I think inline vars and type inference will be especially usefull in functional programming with Delphi. Now we write like this: program TestClosure; {$APPTYPE CONSOLE} uses SysUtils; var Proc: TProc; begin Proc := (function: TProc var n: Integer; begin n := 0; Result := procedure begin Write(n); Inc(n); end; end)(); Proc; Proc; Proc; Proc; Readln end. In the new Delphi 10.3 Rio, this can probably be reduced to program TestClosure10_3; {$APPTYPE CONSOLE} uses SysUtils; begin var Proc := (function: TProc begin var n := 0; Exit(procedure begin Write(n); Inc(n); end); end)(); Proc; Proc; Proc; Proc; Readln end. BTW can you say what this code will display? Similar JavaScript code for comparison: var func=(function(){ var n = 0; return function(){ console.log(n); n++; } })(); func(); func(); func(); func();
  7. Kryvich

    Inline Variables Coming in 10.3

    Then the interface needs to know about the default class that implements it. Get circular references between units.
  8. Kryvich

    Inline Variables Coming in 10.3

    What's wrong with this code? It should create and return an object of TInterfacedObject type, isn't it? Well, it should be freed after use: Instance.Free;
  9. Kryvich

    Visual tweaks

    I agree. Avatars in messages need to be reduced in size from 138x138 to 42x42, as in the list of topics. Avatars in G+ are 45x45 in size, and that's enough. The caption "Members" can also be hidden, show only "Administrators", as implemented in G+. The number of posts and the Delphi version can be removed. All user information can be shown in the pop-up window when you hover on an user's avatar.
×