Logo

dev-resources.site

for different kinds of informations.

SPVM improved Exchange API at v0.9684. Welcome to this easy world of type conversion!

Published at
1/24/2023
Categories
perl
spvm
beginners
programming
Author
yukikimoto
Categories
4 categories in total
perl
open
spvm
open
beginners
open
programming
open
Author
10 person written this
yukikimoto
open
SPVM improved Exchange API at v0.9684. Welcome to this easy world of type conversion!

SPVM improved Exchange API at v0.9684.

What is the Exchange API? It is a method for converting Perl data structures and SPVM data structures to each other.

SPVM is a statically typed language. Have you ever thought about the difficulties in passing an array of strings to a statically typed language?

Sounds easy? Please try it, this difficulty will be harder than you think. Strings are not just numbers. It must be dynamically allocated in memory. And when it comes to arrays, you need to allocate memory for the array, allocate memory for multiple strings, and assign them to the array. And finally, multiple strings must be deallocated and the array must be freed.

How many lines does this take? What happens if we repeat this over and over? More mistakes. More copy and paste. Your brain will get bored with the same thing over and over again.

# SPVM
class MyClass {
  static method foo ($strings : string[]) { ... }
}

# Perl
SPVM::MyClass->foo(["aaa", "bbb", "ccc"]);
Enter fullscreen mode Exit fullscreen mode

So you do not have to think about anything. Just pass the Perl string array reference as is.

This is just one example, but there are many automatic type conversions and methods that support conversions.

This is just one example, but there are many automatic type conversions and methods available in the Exchange API to support conversions.

Why don't you take a step into the world of SPVM's easy type conversion? The ease of type conversion will change the value of interactions between statically and dynamically typed languages.

spvm Article's
30 articles in total
Favicon
How to create Mac GUI applications in SPVM?
Favicon
How to create a parallel echo server using goroutines in SPVM?
Favicon
How to generate an executable file for an AI program using SPVM ?
Favicon
SPVM::R - A Port of The R Language Features.
Favicon
SPVM::Resource::Eigen released
Favicon
SPVM Documentation
Favicon
How to use OpenMP from Perl with SPVM.
Favicon
How to use zlib (a C library) from Perl with SPVM
Favicon
SPVM::Digest::MD5 - MD5
Favicon
SPVM::MIME::Base64 - Base64 Encoding/Decoding
Favicon
SPVM::MIME::QuotedPrint - Quoted-Printable encoding/decoding
Favicon
SPVM::Math - Mathematical Functions
Favicon
SPVM
Favicon
SPVM::Sys now supports symbolic links on Windows, adds Perl-compatible API.
Favicon
SPVM now supports object-oriented programming in Perl
Favicon
First release of SPVM::Resource::RE2 Resourcing the regular expression library Google RE2
Favicon
First release of SPVM::File::Temp and SPVM::File::Find
Favicon
SPVM::File::Path and SPVM::File::Glob are newly released.
Favicon
First release of SPVM::File::Copy and SPVM::FindBin
Favicon
First release of SPVM::File::Spec - complex regular expressions, file tests, SPVM::Cwd, inheritance
Favicon
SPVM::File::Basename is released. This is the first module of SPVM using regular expressions.
Favicon
SPVM improved Exchange API at v0.9684. Welcome to this easy world of type conversion!
Favicon
SPVM supported self Compiler in 0.9683.
Favicon
SPVM 0.9680 is released
Favicon
SPVM 0.9677 is released
Favicon
SPVM 0.9676 is released
Favicon
SPVM 0.9672 is released
Favicon
SPVM 0.9670 is released
Favicon
SPVM 0.9669 is released
Favicon
SPVM 0.9668 is released

Featured ones: