DEV Community

mikeyGlitz
mikeyGlitz

Posted on

3 Trends in Emerging Programming Languages

As a professional in the software field, it is important to stay up-to-date on trends and changes in the field. Here are a few trends that I've noticed in languages lately. The examples I will present use emerging languages which I imagine will become more prominent in the near future.

Type Inference

Type inference has existed in languages for a while. Lately, it seems to be gaining prominence. Even conservatives languages (Java) are adopting
type inference. Type inference in languages typically begin with var or let.

Typescript:

let myVar = "something"
Enter fullscreen mode Exit fullscreen mode

Kotlin

var myVar = "something"
Enter fullscreen mode Exit fullscreen mode

Go

var myVar := "something"
Enter fullscreen mode Exit fullscreen mode

The idea with the var or let keyword in these languages is to save extra keystrokes and allow the compiler to infer the type based on the assignment as opposed to the traditional example:

String myString = "something";
Enter fullscreen mode Exit fullscreen mode

Disappearance of Classes

The title of this section is misleading. When I refer to disappearance of classes, I mean disappearance of classes in the classic C#/Java stance. Getters and Setters are starting to be considered redundant and verbose.

public class MyClass {
  private String field1
  public getField1() { return this.field1; }
  public setField1(String field1) { this.field1 = field1; }
}
Enter fullscreen mode Exit fullscreen mode

Class objects are being restructured such that the properties look more like a struct. In some cases (Kotlin), the getter/setter logic are inferred by the compiler and generated behind-the-scenes

Go

type myStruct struct {
  field1: string
}
Enter fullscreen mode Exit fullscreen mode

Kotlin

class myClass {
  var field1: String
}
Enter fullscreen mode Exit fullscreen mode

Typescript

class myClass {
  field1: String
}
Enter fullscreen mode Exit fullscreen mode

โš  There are some libraries which can make Java less painful in this regard such as Lombok

Shifting of Types to the Right

In traditional languages, when declaring a variable, the expression typically resembles the form:

<Type> <Symbol> <Operator> <Operand>
Enter fullscreen mode Exit fullscreen mode

A pattern with these emerging languages is that types are moving to the right:

<Symbol>: <Type> <Operator> <Operand>
Enter fullscreen mode Exit fullscreen mode
List<String> myList = new ArrayList<String>();
Enter fullscreen mode Exit fullscreen mode

Here are a couple of examples:

Declaring a variable:

Go

var library: Book[]
Enter fullscreen mode Exit fullscreen mode

Kotlin

fun sendMessage(message: String): boolean {...}
Enter fullscreen mode Exit fullscreen mode

Why This Matters

Although mature established languages (i.e. C#, Java, C\C++) and the bodies that maintain them are contributing their best efforts to pursue some of the latest trends in programming language patterns, there may be a chance that future developers are not educated in more traditional development practices. One example is the prevalence of coding schools which only teach Javascript/Typescript. As a developer it's important to mentor junior developers as well as non technical personnel. Part of that mentorship involves being aware of the changes in languages in order to communicate more effectively with these audiences.

Additionally, there may be better ways to structure syntax with these new patterns which weren't previously available under more traditional pardigms.

Other Thoughts/Discussion

Have you noticed any programming language trends that aren't covered in this article?

Are there things you see being taught today that wouldn't be considered traditional (i.e. Functional/Reactive over OOP)?

Top comments (0)