Releases: julelang/jule
Jule 0.1.5
Language
- add: grouped constant variables
- add: tags for structure fields
- add: blank identifier support for global variables
- update: goto statement rules
- update: exceptional functions must be used alone
- update: all possible types of type-enums mut be handled in type-match statements
- update: all possible fields of enums mut be handled in match statements
- update: the built-in
copy
function allows different types if actual types are equal - redesign: enums
- remove: default expressions of structure fields
Compiler
- update: use ThinLTO instead of FatLTO
- fix: strict aliasing optimizations of back-end compiler may cause unexpected behavior
- fix: the
--opt-copy
may apply wrong optimizations for mutable values - fix: code generation for multi-return statements with dynamic types
- fix: code generation for captured anonymous function variables from multi-return variables
- fix: inherited type-enums considered valid type for type matching
- parser: fix binary expression operator handling
- parser: fix trailing invalid tokens ignored of use declarations
- sema: fix comptime (obtained by std/comptime) constant value handling for binary expressions
- sema: fix handling of untyped boolean values
- sema: fix evaluation may allow using of blank identifiers
- sema: fix using of non-existent enum field may cause crash during analysis
- sema: fix catching of duplicate package aliases
- sema: fix collection of references to runtime implementations such as slices and maps might be ignored if type source is a type alias
Standard Library
- add:
std/jule/directive
- add:
std/jule/dist
- add:
std/jule/log
- std/comptime: add
comptimeDecl.Tags
,comptimeDecl.Tag
,comptimeDecl.IsTag
- std/encoding/json: add structure field tag support
- std/encoding/json: fix HTML escape handling
- std/encoding/json: nesting depth set to 256
- std/encoding/json: fix the Decode function do not set destination array to zero for empty JSON arrays
- std/jule: add
Blank
,Anon
,IsBlank
,IsAnon
- std/jule/ast: add
Var.Group
,Var.GroupIndex
- std/jule/build: add
SetEnv
,PathAPI
- std/jule/build: remove
PathApi
- std/jule/build: reimplement
PathStdlib
,PathExec
,PathWd
- std/jule/build: remove directive relevant content because of new
std/jule/directive
package - std/jule/build: remove dist relevant content because of new
std/jule/dist
package - std/jule/build: remove log relevant content because of new
std/jule/log
package - std/jule/constant/lit: add
GetRune
- std/jule/integrated: fix Windows UTF16 encoding/decoding
- std/jule/integrted: rename
U16PtrToStr
asUTF16PtrToStr
- std/jule/token: refactoring with reimplemented API
- std/jule/sema: remove
Flag
- std/jule/sema: add
Default
,Shadowing
,RetState
,Var.RetState
- std/jule/sema: update the standard values of
Var.RetOrder
- std/jule/sema: remove
EnumItem
- std/jule/sema: add
Var.IsEnumField
,Var.GroupIndex
,Var.Group
,Var.Iota
- std/os: reimplement standard input/output (see #140)
- std/strings: add
Clone
API
jule::Str
: fixoperator+=
memory deallocation bugjule::Fn
fix ctx-memory handling
Legacy Support
This version is incompatible with source code written for previous versions. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Incompatibilities with the new exceptional handling standard
- Incompatibilities with the new
goto
semantics - Structure fields with default expressions
- Missing/unhandled cases for the enum/type-enum types in match statements
- Renaming and reimplementations on the standard library
Jule 0.1.4
Language
- add: 3-index slicing
- add: type assertion
- update: range iteration behavior of strings
- update: use arbitrary-big numbers for untyped constants
- update: floating-point division behavior
- update: casting works different for dynamic types
- update: type aliases are not considered cycle-risky for type aliases
- update: allow strict type aliases to type any for type enums
- update: strict type aliases to type-enum will not be inherited
- rename:
SmallestNonZero
static field asSmallestNonzero
of thef64
andf32
- remove: named field support of type-enums
Compiler
- numerous optimizations, fixes, and improvements
- fix: code generation for casting expressions from dynamic type to implicitly smart pointer types such as maps and channels
- fix: code generation of trait virtual table for implicitly smart pointer types such as maps and channels
- fix: code generation of dynamic type data for implicitly smart pointer types such as maps and channels
- fix: code generation will not generate iteration break-point for
for in []rune(s)
iterations when--opt-iter
optimizations enabled - fix: code generation may be failed for declarative multi-assign expressions if
--opt-assign
optimizations enabled - fix: the
--opt-zcopy
and--opt-zappend
optimizations may cause compile issues - fix: integer wrap around behavior might not be implemented in IR and might compile with undefined behavior
- fix: code generation for array comparisons
- fix: the
--opt-math
optimizations may apply wrong optimizations - fix: code generation for exceptional handler scopes with no use declaration
- fix: location information handling for error messages
- (windows) fix: compiler does not adds
.exe
extension if it is missing - (windows) fix: LTO support for Clang (it may cause compile errors with not-MinGW Clang)
- add:
tool targets
command - update: catch invalid target pairs and complain with error
- token: fix carriage-return characters may cause infinite loop when tokenizing string literals
- token: fix
Fileset.GetRow
ignores final lines with no new-line - parser: fix function with errors may cause crash
- parser: reused directive causes errors instead of ignoring silently
- parser: fix unary operator handling of binary expressions
- parser: fix missing expressions in brace literal may cause crash instead of compiler error
- sema: untyped constant literals allowed in Safe Jule for binded types
- sema: fix value type determination may ignore the strict type alias sources when evaluation of array and structure literals
- sema: fix evaluation of binary expressions for
comptimeTypeInfo
- sema: fix owner define will not reference to the struct if it used via type alias when evaluating expression
- sema: fix type-enums are not considered as mutable types
- sema: fix global variable referencing a function may cause crash due to analysis issue
- sema: fix and improve package analysis
- sema: fix implicit casting handling of the
error
calls - sema: fix type compatibility checking for constant floating-point expressions
- sema: fix type compatibility checking may ignore whether type is strict type alias for functions
- sema: fix responsive type handling of the built-in append function
- sema: fix reference collection for types referenced from eval
- sema: fix handling of comparable array types
- sema: fix checking of the reserved main and initializer function signatures
Standard Library
- add: std/errors
- (windows) all: all MinGW dependencies are removed, standard library uses Windows API
- all: error handling model updated to latest recommended style
- (windows) runtime: fix #107
- runtime: fix deadcode analysis for mutexes
- runtime: fix the built-in
make
function does not initialize all capacity (#133) - runtime: fix the built-in
append
function does not initialize all capacity if a new slice allocated (#134) - runtime: fix the runtime string conversion function cannot handle reserved
Str
functions of can-nil types - runtime: smart pointer types supports using of element’s reserved
Str
function - std/conv: reimplement
- std/jule/types: reimplement
- std/math/cmplx: reimplement
- std/os: reimplement
- std/bufio: add
Scanner.EOF
- std/bytes: the split functions limits capacity of parts to its length
- std/comptime: remove
Kind
(fields remain as constant variables) - std/encoding/csv: rename
Writer.UseCrlf
asWriter.UseCRLF
- std/encoding/json: fix
Valid
function reports false for some JSON inputs with spaces - std/encoding/json: fix
DecodeJSON
reserved decoder function does not supports JSON objects or arrays - std/encoding/json: numerous minor fixes and improvements
- std/encoding/json: fix
Decode
function throws UnexpectedToken error if JSON input have trailing spaces - std/encoding/json: fix invalid token may cause panic while decoding array or object (with map type)
- std/encoding/json: fix invalid token case may be reported with
DecodeError.InvalidValue
instead ofDecodeError.InvalidToken
while decoding object (with struct type) - std/encoding/json: fix invalid key may cause panic while decoding map
- std/encoding/json: add
Value
,Object
,Array
,Bool
,Number
, andString
- std/encoding/json: add dynamic decoding support
- std/math: minor fixes
- std/math: rename
NextAfter32
asNextafter32
- std/math: rename
NextAfter
asNextafter
- std/math: rename
F64Bits
asF64bits
- std/math: rename
F32Bits
asF32bits
- std/math: rename
F64frombits
asF64frombits
- std/math: rename
F32frombits
asF32frombits
- std/math/big: rename Int.BitNot as Int.Not
- std/math/big: update
Int.Parse
definition and behavior - std/math/big: add
Accuracy
,Int.F64
- std/math/big: fix
Int.Parse
does not catch invalid separators - std/io: add
ReaderAt
,WriterTo
,Seeker
,WriteStr
,ReadAll
,LimitReader
,SeekStart
,SeekCurrent
,SeekEnd
,Copy
,CopyBuffer
, andDiscard
,ErrShortWrite
,ErrShortBuffer
,ErrUnexpectedEOF
,ErrNoProgress
- std/jule/ast: remove
SubIdentType
- std/jule/ast: add
TypeAssertionExpr
- std/jule/sema: remove
TypeEnumItem.Ident
- std/jule/sema: add
Type.SoftStruct
,TypeAssertionExpr
- std/jule/sema: remove
TypeEnumItem.Ident
,TypeEnumItem.FindItem
- (windows) std/os: fix long path support after Windows 10.0.15063
- std/os/filepath: update sign of
Abs
- std/os/filepath: add
SplitList
- std/slices: rename
Find
asIndex
,FindLast
asIndexLast
- std/strings: add
Reader
- std/sys: reimplement
Errno
and relevant functions - std/testing: add
T.Logf
- std/unicode: add
In
,IsPrint
API
- remove:
jule::nil
,jule::MAX_32
,jule::MIN_F32
,jule::MAX_F64
,jule::MIN_F64
,jule::MAX_I64
,jule::MIN_I64
,jule::MAX_U64
variables - remove: the
jule::print
,jule::println
,jule::append
,jule::__append
,jule::copy
,jule::__copy
functions - add: the
__jule_print
, and__jule_println
functions - fix: slicing error gives length instead of capacity for capacity information
Legacy Support
This version is incompatible with source code written for previous versions, including Jule 0.1.3. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Incompatibilities with the new error handling standard
- Using dynamic types
- Renaming and reimplementations on the standard library
- Unexpected behavior in range iterations with strings
Jule 0.1.3
Language
- add: map and array literals with explicit type
- add: assertion casting for dynamic types
- update: the built-in
copy
function now uses mutable slicing for destination arrays - update: deferred scopes
- update: trait memory model
- remove: static constant fields support of
impl
statements and structures - remove: manual memory management options
- remove: the
deprecated
directive (see doc comments for deprecation)
Compiler
- numerous minor fixes, optimizations and improvements
- fix: thread runtime initialization
- fix: the
!=
operator equals to the==
operator for struct types in the object code - fix: code generation for implicit
==
operator of struct types - fix: code generation for trait data of strict type aliases
- fix: code generation for postfix statements which uses map lookup as lvalue
- fix: the
--opt-deadcode
optimizations removes trait methods of structures - fix: the
--opt-dynamic
optimization removes type safety for type casting when optimizing type-match statement case which have a previous case with fall statement - fix: code generation for concurrent function calls when parameter count collisions exist
- fix: initialization of runtime environment data
- fix: code generation for result data with channel type
- fix: code generation for raw pointer type metadata of dynamic types
- fix: code generation for trait virtual table of strict type aliases with smart pointer source type
- it may cause compilation problems with GCC before the patch (see CI of
261b80d
)
- it may cause compilation problems with GCC before the patch (see CI of
- add: the
--opt-zcopy
and--opt-zappend
optimization flags - improve: the
--opt-deadcode
optimization removes the following statements after empty select statements - improve: The
--opt-access
optimization removes the boundary analysis of expressions likearray[i&(len(array)-1)]
for arrays whose length is power of two - improve: code generation for select statements
- improve: error messages, with contributions by @adamperkowski (#123)
- parser: fix nested smart pointer types (like
&&int
) have nilToken
field - parser: fix (#119, thanks @puni073 for pointing to the issue) and improve handling of function declarations
- parser: catch repetitive ignoring of an exceptional like
foo()!!!
- parser: fix scope analysis will generate error for expression which is already logged
- parser: fix unsafe namespace support of type analysis
- sema: fix interior mutability analysis for structure copy assignments
- sema: fix
impl
statement handling for structures - sema: fix strict type alias source type analysis
- sema: fix mutability and comparable state analysis of types
- sema: fix type cycle analysis
- sema: fix map types are not considered as mutable even with mutable key/value type
- sema: fix map indexing expressions considered lvalue
- sema: fix analysis and handling indexing support of comptime types
- sema: fix type inference analysis of untyped slice literals
- sema: fix analysis of strict type alias structures, and type-enums for casting
- sema: fix cycle and type analysis of type-enums
- sema: fix reference handling of scope variables
- sema: fix type safety analysis of unsafe pointer (
*unsafe
) type - sema: fix mistyped values may cause crash when evaluating sub-ident expressions
- sema: fix instantiation cycle analysis
- sema: fix generic type and method evaluation
- sema: fix expression evaluation allows non-instantiated generic types for sub-ident expressions
- sema: fix generic type analysis does not supports nested generic type instantiation
- sema: fix generic type analysis of generic define coming from different package
- sema: add responsive expression support for map indexing
- sema: add casting support for traits
- sema: catch unsafe pointer (
*unsafe
) type for invalid dynamic generic type annotations
Standard Library
- add:
std/html
- add:
std/net/url
- add:
std/path
- all: refactoring and rehandling with breaking changes
- runtime: fix the string conversion algorithm tries to call
Str(self)!: str
methods like reservedStr(self): str
methods - runtime: fix sema queue implementation (affects
sync::Mutex
,sync::WaitGroup
, and newsync::RWMutex
) - runtime: fix map lookup does not set to default value if record is not exist (#129)
- runtime: fix blocking-select statement may cause deadlock panic even for no-deadlock cases
- runtime: update hashing algorithm and optimize map implementation
- std/conv: rename the
ConvError
asConv
- std/conv: remove the
Ok
field ofConv
- std/encoding/json: fix custom encoding and decoding method detection
- std/jule/sema: rename
Value
asValueSym
- std/jule/sema: rename
Data
asValue
- std/jule/sema: rename the
Value
field asValueSym
ofVar
andEnumItem
- std/jule/sema: rename the
Data
field asValue
ofValueSym
- std/jule/sema: rename the
Datas
field asValues
ofTupleExpr
- std/mem: remove
Free
andHeap
- std/strings: add the
Replacer
struct - std/sync: add
RWMutex
- std/unicode/utf16: remove
MaxRune
- std/unicode/utf16: add
RuneLen
API
- remove: deferred scope API
- remove:
jule::Trait
jule::Str
: removestd::basic_string
support (#121, thanks @puni073 for pointing to the issue)
Legacy Support
Jule 0.1.3 includes critical bug fixes, and updating is highly recommended. However, this update may require additional effort. It introduces some breaking changes and modifications that could alter behavior, potentially making debugging more difficult. There are significant additions and removals in the API and standard library. Compiled programs may not behave as expected.
Jule 0.1.2
Language
- add: channels
- add: select statements
- add: mutability responsiveness for functions
- add: thread management runtime
- update: all keywords can used as identifier for bind defines
- update: only constant expressions allowed for default value of struct fields
- comptime: add slice literal support for comptime range iterations
Compiler
- fix: global variable initialization ordering
- fix: exceptional optimizations of
--opt-exceptional
flag - fix: output of the
help
command, thanks @lareii for the fix (#118) - fix: code generation for anonymous function calls
- fix: code generation for anonymous functions and other implicit analysis productions
- fix: code generation for empty slice literal
- fix: boundary size variable analysis of the
--opt-access
optimizations - fix: boundary exhibit variable analysis of the
--opt-access
optimizations - parser: fix statement separations and insertions
- parser: fix variable parsing invalid syntax error logging
- parser: fix empty case expression detection
- parser: fix
co
keyword allowed without any expression - parser: fix semicolon terminated empty statements may cause crash
- sema: fix map type analysis for cycles
- sema: fix import path analysis may crash when analysis standard library paths
- sema: fix function type string representation conversion
- sema: fix parsing of unicode code points in string literals
- sema: fix collection of variable dependencies for global variables
- sema: fix use declaration to root module may cause crash
- sema: fix cycle analysis of type aliases
- sema: caught initialization cycles for global variables
- sema: generate errors for invalid escape sequences
- sema: improve map type key constraint analysis
- sema: add responsiveness for the key and value pairs of the map literals
- sema: add built-in panic call support for exception handler scopes with no required use statement
Standard Library
- std/bufio: add the
FinalToken
- std/bufio: remove the
ScannerCfg
struct - std/bufio: remove the
NewCfg
static method of theScanner
- std/bufio: add the
Split
, andBuffer
methods to theScanner
- std/bufio: rename the
SplitLines
function asScanLines
- std/bufio: update
SplitFunc
andScanner
behavior (add final token support) - std/bytes: reimplemented
- std/comptime: add the
Chan
field toKind
- std/comptime: add the channel support to the
Elem
method ofcomptimeTypeInfo
- std/encoding: add the
JSONEncoder
,JSONDecoder
,TextEncoder
, andTextDecoder
traits - std/encoding/json: fix string literal validation
- std/encoding/json: add the
EncodeJSON
field toEncodeError
- std/encoding/json: add the custom encoder and decoder method support
- std/fmt: use
io::Writer
instead ofos::File
for theFprint
,Fprintln
, andFprintf
functions - std/jule: rename the
InitFn
asInitFunc
- std/jule/ast: add the
CanSend
,ChanRecv
,ChanType
, andSelect
structs - std/jule/ast: rename the
MatchCase
asMatch
- std/jule/ast: rename the
VarDecl
asVar
- std/jule/ast: rename the
TypeDecl
asType
- std/jule/ast: rename the
TypeDeclKind
asTypeKind
- std/jule/ast: rename the
IdentTypeDecl
asIdentType
- std/jule/ast: rename the
SubIdentTypeDecl
asSubIdentType
- std/jule/ast: rename the
NamespaceTypeDecl
asNamespaceType
- std/jule/ast: rename the
SptrTypeDecl
asSptrType
- std/jule/ast: rename the
SlcTypeDecl
asSliceType
- std/jule/ast: rename the
TupleTypeDecl
asTupleType
- std/jule/ast: rename the
PtrTypeDecl
asPtrType
- std/jule/ast: rename the
ArrTypeDecl
asArrayType
- std/jule/ast: rename the
MapTypeDecl
asMapType
- std/jule/ast: rename the
RetTypeDecl
asRetType
- std/jule/ast: rename the
EnumDecl
asEnum
- std/jule/ast: rename the
TypeEnumDecl
asTypeEnum
- std/jule/ast: rename the
EnumItemDecl
asEnumItem
- std/jule/ast: rename the
TypeEnumItemDecl
asTypeEnumItem
- std/jule/ast: rename the
TypeAliasDecl
asTypeAlias
- std/jule/ast: rename the
TraitDecl
asTrait
- std/jule/ast: rename the
StructDecl
asStruct
- std/jule/ast: rename the
FnDecl
asFunc
- std/jule/ast: rename the
FnCallExpr
asFuncCallExpr
- std/jule/ast: rename the
GenericDecl
asGeneric
- std/jule/ast: rename the
UseDecl
asUse
- std/jule/ast: rename the
ParamDecl
asParam
- std/jule/ast: rename the
FieldDecl
asField
- std/jule/ast: rename the
FallSt
asFall
- std/jule/ast: rename the
GotoSt
asGoto
- std/jule/ast: rename the
LabelSt
asLabel
- std/jule/ast: rename the
ContSt
asContinue
- std/jule/ast: rename the
AssignSt
asAssign
- std/jule/constant/lit: add the
Error
struct - std/jule/parser: rename the
Ast
field asAST
ofFileInfo
- std/jule/sema: add the
Select
,ChanSend
,ChanRecv
, andBuiltinCloseCallExpr
structs - std/jule/sema: add the
CaseOwner
enum - std/jule/sema: add the
ExprToken
field toRangeIter
- std/jule/sema: update the type of the
Owner
field ofCase
asCaseOwner
- std/jule/sema: update type of the
Elems
field ofArrayExpr
andSliceExpr
- std/jule/sema: rename the
FnCallExpr
asFuncCallExpr
- std/jule/sema: rename the
FallSt
asFall
- std/jule/sema: rename the
GotoSt
asGoto
- std/jule/sema: rename the
ContSt
asContinue
- std/jule/sema: rename the
Slc
asSlice
- std/jule/sema: rename the
Array
asArray
- std/jule/sema: rename the
Fn
asFunc
- std/jule/sema: rename the
FnIns
asFuncIns
- std/jule/sema: rename the
AnonFnExpr
asAnonFuncExpr
- std/jule/sema: rename the
Slc
method ofType
asSlice
- std/jule/sema: rename the
Arr
method ofType
asArray
- std/jule/sema: rename the
Fn
method ofType
asFunc
- std/jule/sema: rename the
Tup
method ofType
asTuple
- std/jule/sema: rename the
FindFn
method ofLookup
asFindFunc
- std/jule/sema: rename the
Mtch
field ofBreak
asMatch
- std/math/big: fix
Int.Parse
returns zero integer with not exception even if all value have not been consumed - std/math/big: add the
InvalidFormat
field toConvError
- std/os: add the
LookupEnv
,Getenv
, andSetenv
functions - std/runtime: add the
NumCPU
function - std/strings: reimplemented
- std/sync: add the
Locker
trait - std/sync: add the
Cond
struct - std/sync/atomic: reimplemented
- std/time: add the
ParseError
enum - std/time: add the
Month
, andWeekday
type aliases - std/time: add the
January
,February
,March
,April
,May
,June
,July
,August
,September
,October
,November
,December
,Sunday
,Monday
,Tuesday
,Wednesday
,Thursday
,Friday
,Saturday
,Layout
,ANSIC
,UnixDate
,RubyDate
,RFC822
,RFC822Z
,RFC850
,RFC1123
,RFC1123Z
,RFC3339
,RFC3339Nano
,Kitchen
,Stamp
,StampMilli
,StampMicro
,StampNano
,DateTime
,DateOnly
, andTimeOnly
constants - std/time: add the
UTC
, andLocal
globals - std/time: add the
Now
,Unix
,UnixAbs
,Since
,Until
,LoadLocationFromTZData
,FixedZone
,Parse
,ParseInLocation
, andParseDuration
functions - std/time: reimplement the
Time
andAbsTime
- std/time: add the
Location
struct
Legacy Support
Due to renaming in the standard library, some reimplementations and language update, code from older versions may not compile with the new version. Consequently, you may need to update your code to according to the new version.
Jule 0.1.1
Due to a technical issue, there is no release note for this release.
Thank you for your patience and understanding.
Legacy Support
This version includes some important semantic changes. For example, a different syntax is now used for the old type alias system, and the old syntax has completely different semantics. In addition there are some renamings and some significant changes to the standard library. All of this may break your existing code, but as always upgrading is recommended.
Jule 0.1.0
Language
- add: return forwarding support for multi-ret functions
- add:
uint
support for pointer arithmetic - add: the
export
directive - add: global scope support for exceptionals
- update: closure implementation
- update: trait implementation
- update: memory initialization behavior
- update: integer overflow behavior
- update: jule memory model
Compiler
- minor improvements, optimizations and bug fixes
- add: the
--opt-iter
, and--opt-dynamic
optimization flags - major improvements for the
--opt-access
optimization flag (experimental) - fix: swap optimization analysis may cause crash
- fix: reference variable analysis
- fix: the
--opt-deadcode
optimization flags removes operator overloading methods - fix: deadcode analysis eliminates reserved methods
- fix: code generation for literals of binded structures
- fix: code generation skips safety checks for modulo and division assignment operators
- fix: tab indentation handling for logs
- fix: code generation for function and method declarations
- fix:
--opt-math
optimization flag - fix and improve: default value handling for declarations
- parser: fix missing expected tokens may cause crash
- parser: fix invalid syntax for short variable declarations may cause crash
- parser: fix anonymous function declaration and function type declaration handling
- parser: fix variable declaration in scope with invalid syntax may cause crash
- parser: fix parser may crash when parsing match-case statements with invalid syntax
- parser: fix unsafe function type parsing
- parser: fix single declarative assignment statement handling
- parser: fix unhandled left operand error of assign statement may cause crash
- sema: fix function call argument analysis
- sema: fix mutability analysis for slices, arrays, and maps
- sema: fix handling of
CastingExprModel
tokens - sema: fix type analysis for
*unsafe
types may cause crash - sema: fix mutability analysis for destionation slice parameter of the built-in append function
- sema: fix interior mutability analysis for closures
- sema: fix declarative multi-assign analysis
- sema: fix trait implementations with failed type analysis may cause crash
- sema: fix type comparability analysis reports true for arrays with not-comparable element type
- sema: fix dependency collection for structures with type aliases
- sema: fix non-generic function handling for evaluation
- sema: fix global variable analysis may be wrong, especially when using the use declaration namespace in initialize expression
- sema: fix comparable analysis of binary eval
- sema: fix dynamic type annotation analysis of generic function calls
- sema: fix and optimize goto statement analysis
- sema: fix trait method evaluation always returns immutable data even base data is mutable
- sema: fix mutability analysis of map-lookup assignments
- sema: fix map-lookup assignment type compatibility analysis
- sema: fix mutability analysis of the built-in
error
function - sema: fix operator syntax analysis for assignments
- sema: fix matched type duplication analysis of match-type statements
- sema: fix reference collection of variables
- sema: fix casting expression handling
- sema: fix mutability analysis of variadic expressions
- sema: add while-next iteration support to missing return analysis infinite iteration detection
- sema: caught not-instantiated structure type declarations for evaluation
- importer: fix duplicated package analysis
Standard Library
- minor bug fixes and improvements
- add:
std::encoding::json
- add:
std::runtime
- reimplement:
std::comptime
- remove:
std::vec
- remove:
std::queue
- remove:
std::stack
- remove:
std::thread
- rehandle: the
Append
method variants of thestd::encoding::binary
- improve: handling of read/write operations
- builtin: add the
str
support for[]byte
types for the built-inappend
function - builtin: remove: the
assert
function - std::sync: reimplement
Mutex
- std::slices: add the
SortFunc
function - std::strings: add the
Compare
function - std::io: the
Scanner
forwards any exceptional - std::math::big: fix and optimize multiplications
- std::math::big: fix subtractions
- std::math::big: bit shifting methods takes
int
now - std::math::big: add the
DivMod
, andSqrt
methods toInt
- std::flag: caught nil variables for the
AddVar
method ofFileSet
- std::sync::atomic: use constraints for general atomic functions
- std::jule::ast: rename
Ast
asAST
- std::jule::integrated: the move
ToStr
function - std::jule::sema: rename the
PerformsRC
method asGC
ofTypeKind
- std::jule::sema: remove the
IterRelation
struct - std::jule::sema: remove the
IterRelation
field of theVar
struct - std::jule::sema: rename the
L
field asLeft
andR
field asRight
ofMultiAssign
- std::jule::sema: rename the
L
field asLeft
andR
field asRight
ofAssign
- std::jule::sema: remove the
IntegratedToStrExprModel
- std::jule::sema: add the
Decls
field toMultiAssign
- std::jule::sema: add the
Captured
field toAnonFnExprModel
- std::jule::sema: add the
Owner
field toFieldIns
- std::jule::sema: fix the
GetKindStr
method ofFnIns
may crash if declaration is not exist - std::jule::sema: add the
Scope
field toMatch
- std::jule::sema: add the
Scope
andIndex
field toGotoSt
andLabel
- std::jule::sema: add the
ChildIndex
andStmtIndex
toScope
- std::jule::sema: fix the
IsMethod
method ofFn
is not reports true for traits - std::jule::sema: fix the
GC
method ofTypeKind
is not reports true for type enums - std::strings:: add the
EqualFold
function - std::unicode: add the
SimpleFold
function - std::unicode::utf8: fix
DecodeRune
andDecodeRuneStr
- std::unsafe: the
Slice
function takes an argument for capacity
API
The API is now largely implemented by the compiler, adhering to the Jule Runtime implementation. Many important functions and functions have been implemented with Jule. Please check the API documentation for changes.
Legacy Support
This can totally be described as a breaker. It includes radical changes in many places such as standard library, compiler and API. Therefore, updating the version may require additional effort, but it is definitely recommended.
About Releases
Jule was in the pre-release phase for more than 1 year and the pre-release qualification was removed with jule0.0.15
. With this version, there is a real beta version and it is called jule0.1.0
. This is not a stable release and does not guarantee any particular stability.
Jule 0.0.15
Language
- add: short variable declaration syntax
- remove: the built-in
swap
method of slice and array types - remove: deriving and cloning
- update: data types are considered as built-in type aliases instead of keywords
- update: slicing behavior of slices
- update: traits are considered as mutable type
- update: consider
true
,false
andnil
keywords as built-in constant variables and imagine keywords - update: strings are immutable now and performs rerefence-counting
- update: static variables cannot be reference
- update: syntax of comptime matching and comptime iterations
Compiler
- numerous optimizations, improvements and minor fixes
- add: the
--opt-slice
,--opt-assign
, and--opt-exceptional
optimization flags - fix: C++20 support
- fix: code generation for tuple-type declarations, thanks @sparky4pro and
_lex
for pointing to the issue - fix: some backend compilers may cause compile error when unicode identifiers used on some platforms
- fix: code generation will not generate string literals with literal-special algorithm for structure ostream
- fix: code generation for multi-assign statements with tuple-return functions including traits and any types
- update:
--opt-str
optimization, removed some optimizations because of new immutable strings - improve: the
--opt-append
optimizations for self-append l-value expressions - improve: the
--opt-cond
,--opt-math
,--opt-str
,--opt-deadcode
and--opt-ptr
optimizations - lex: fix
IsAssign
function reportstrue
for the dot token - lex: fix
IsBinOp
function reportsfalse
for sometrue
tokens - parser: fix type-enum item parsing
- parser: fix structure field parsing may cause runtime crash due to source code including missing type
- error for the field
- parser: caught keywords used in use declarations
- sema: fix type declaration handling from unary expression
- sema: fix compiler crash during constant matching analysis with zero-statement case
- sema: fix case handling of comptime-matching, remove all cases if any case is not matched
- sema: fix default case handling comptime-matching, avoid making analysis without checking existing case matches
- sema: fix handled unexceptional built-in functions are not causes compile error
- sema: fix dynamic type annotation for generic function calls allows nil-literals
- sema: fix
comptime::ValueOf
function allows nil-literals - sema: fix illegal cycle caught algorithm for types
- sema: fix mutability analysis of unary expressions
- sema: fix declarative-multi-assign statement may cause runtime crash with single expression
- sema: fix mutable data sharing is allowed even field is accessible between copies within scope of the interior mutability
- sema: fix lvalue analysis of indexing epxressions
- sema: fix type analysis of the built-in
make
function accepts all types - sema: fix entry point and init functions can take the
#deprecated
directive - sema: fix evaluation of type declarations
- sema: fix reference collection for generic functions
- sema: fix type compatibility analysis and handling of untyped literals
- sema: caught responsive-immutable struct literals for mutable operations and interior mutable memory
- sema: caught blank identifier use declaration aliases and link paths
- sema: minor improvements for constant expression evaluation:
- Improvement: don’t remove constant status of string-enum to string casting expressions
- Convert at comptime: constant-string to byte-slice casting expressions
- Convert at comptime: constant-string to rune-slice casting expressions
- Convert at comptime: constant-byte to string casting expressions
- Convert at comptime: constant-rune to string casting expressions
Standard Library
- numerous optimizations, improvements and minor fixes
- add: std::unsafe
- reimplement: std::jule::constant::lit
- std::fs: remove the
WriteStr
method ofFile
- std::io: remove the
WriteStr
method of theByteStream
andFileStream
- std::comptime: rename
Kind.Ref
asKind.SmartPtr
- std::comptime: add the
Match
,TypeAlias
,Line
,File
, andFiles
functions - std::comptime: remove the
Range
functions - std::comptime: add the
RC
method tocomptimeTypeInfo
- std::encoding::base64: fix encode(decode length calculation may cause crash because of zero-length allocation
- std::encoding::base32: fix encoding without padding
- std::encoding::base32: add the
EncodeLen
andDecodeLen
functions - std::encoding::base64: add the
EncodeLen
andDecodeLen
functions - std::encoding::ascii85: rename the MaxEncodedLen function as MaxEncodeLen
- std::jule::lex: remove the
IsOk
method of theFile
- std::jule::ast: remove the
IsPrim
method of theIdentTypeDecl
- std::jule::ast: remove the
IsSelf
field of theSubIdentExpr
- std::jule::ast: rename
BinopExpr
asBinaryExpr
- std::jule::sema: remove the
IsBuiltin
method ofTrait
- std::jule::sema: remove the
CommonIdentExprModel
andCommonSubIdentExprModel
- std::jule::sema: rename
BinopExprModel
asBinaryExprModel
- std::jule::sema::types: remove the all
IsCompatible
variants - std::unicode::utf8: rename the
UtfMax
constant asUTFMax
- std::math: rename the
Fma
function asFMA
- std::strings:: add the
StrBuilder
- std::math::big: use constraints for the
Int.New
static method - std::flag: use constraints for the
Add
andAddVar
functions - std::jule::integrated: rename the
Utf16FromStr
function asUTF16FromStr
- std::jule::integrated: rename the
Utf16ToStr
function asUTF16ToStr
- std::jule::integrated: add the
StrToBytes
function
API
- fix:
jule::to_str<T>
function define declared asjule::to_str2<T>
- fix:
std::mem::Free
function support of thejule::Trait<Mask>
andjule::Any
- fix: wrong declaration of
jule::utf16_decode
- fix: interoperability compatibility of mutable slicing algorithm of
jule::Str
- remove:
#derive Clone
implementations jule::Str
: reimplemented as immutable length-based (not NULL termination based) stringjule::Slice<Item>
: add thevoid append(const jule::Slice<Item>&)
methodjule::Slice<Item>
: remove theswap
methodjule::Array<Item, N>
: remove theswap
method
Legacy Support
This version contains many bug fixes so updating is highly recommended. However, if you update it, your old codes may not compile and some performance problems may occur. For compilation issues, you need to update your code accordingly.
Here are some official tips for performance and interoperability issues:
First of all, there is not much change that could cause performance degradation. Therefore, there is only one specific point you need to look at: strings. Strings cause performance degradation mostly in concatenation operations. Since Jule used mutable strings in previous versions, it could handle this quite efficiently, but now immutable strings are used. Therefore, the cost of merging operations is significantly higher. For strings that you do a high amount of concatenation, use the StrBuilder
structure provided by the std::strings
package. This structure is designed to concatenate strings and treat them as a single string and should largely prevent performance loss.
Review where you rely on automatic conversion of strings for interoperability, otherwise some errors may occur in your program. This is because strings are now length-based rather than NULL terminated. This can lead to various errors due to the lack of NULL termination, especially when working with C-strings. For a safe conversion, the StrToBytes
function is provided by the std::jule::integrated
package. It is highly recommended to use this function for conversion.
If you are wondering why new strings are designed to be length-based rather than NULL termination, despite the risk of causing interoperability problems, it is recommended that you read this section in the manual: About Interoperability and Type Compatibility - Strings.
About Releases
Previous versions were marked as pre-release. It will no longer be marked. Since the bugs have been largely resolved and Jule is mature enough to be used for many tasks, it has been decided that beta versions will no longer be marked as pre-release. So this doesn't mean Jule is stable now. Compiler and standard library still may have some important bugs since Jule is still in beta.
Jule 0.0.14
Language
- add: compile-time functionalities like comptime-reflection empowered by standard library
- add: compile-time conditional matching
- add: compile-time iterations
- update: constant variables are no longer considered for “unused variable” analysis
Compiler
- numerous minor fixes, optimizations and improvements
- minor improvements for tests code generation
- add: necessary library links to compile command for Windows (improves MSVC compatibility)
- fix: code generation for trait function call arguments
- fix: handling bytes and runes for string casting
- parser: fix expression parsing, thanks to @lakshgupta for getting this noticed with #108
- parser: fix parsing of map type declarations in expressions
- sema: fix caughing not invoked built-in functions
- sema: fix comparable constrait analysis
- sema: fix structures skips declaration analysis of their methods
- sema: fix generic defines uses same instance for hint type of cpp-linked types (for example:
int
andcpp.Int
(linked asint
) - sema: caught variadic reference parameters
- sema: caught anonymous methods for traits and structures
- sema: caught unsupported types for binary operators
- sema: stop analysis for scope when comptime-panic call occurred
- sema: fix handling of type-enums
Standard Library
- add: std::comptime
- std::bytes: add the
Cut
function - std::strings: add the
Cut
function - std::mem: disallow void and function types for the
SizeOf
andAlignOf
functions - std::jule::sema: remove the
FindPackage
method of theLookup
trait - std::jule::sema: add the
Comptime
field to theMatch
- std::jule::sema: add the
Ordered
method toTypeKind
- std::jule::types: add
uintptr
support for theBitsizeOf
function - std::jule::sema: fix the
Str
method of theMap
struct uses old format
API
jule::Str
: removejule::I32
constructor and add the staticfrom_byte
andfrom_rune
methods
Jule 0.0.13
Language
- add: inheritance support for traits
- add: casting support for traits with common behaviors
- update: some binded types are accepted as comparable
- update: enum mechanics
- update: pass directive adds to command-lines after source files
Compiler
- various fixes, improvements and optimizations
- add:
--opt-str
optimization flag - update:
--opt-copy
optimization flag - fix: define ordering
- fix: code generation for casting from expressions
- fix & improve: code generation for type informations
- fix: type information generation for enum types
- parser: fix plain-type parameter parsing
- sema: fix slice literal evaluation
- sema: fix duplicated parameter identifier analysis
- sema: fix checking of test functions
- sema: fix limit handling of types
Standard Library
- add: std::hash
- add: std::hash::adler32
- add: std::hash::fnv
- std::slices: add the
Sort
andIsSorted
functions - std::process: reimplement the
Cmd
- std::process: remove the
Pid
type alias - std::fs: reimplement the
Status
- std::env: fix
Env
function returns command-line arguments instead of environment variables - std::fs: add the
WriteStr
method to theFile
- std::fs: add the
WriteStr
static method to theFile
- std::io: the
WriteStr
method of theByteStream
andFileStream
, takes reference string now - std::sys: remove the
Wopendir
,Wreaddir
, andWclosedir
functions for Windows - std::sys: add the
FindFirstFile
,FindNextFile
,FindClose
functions for Windows - std::sys: remove the
Wdir
andWdirent
structs for Windows - std::sys: add the
Win32FindData
struct for Windows - std::sys: remove last parameter of the
ReadConsole
function for Windows - std::jule::ast: add the
Inherits
field to theTraitDecl
- std::jule::sema: add the
Inherits
field to theTrait
- std::jule::types: add the
MaxI
,MaxU
, andMinI
functions
API
- optimize: string UTF-8 handling
- add:
jule::utf8_push_rune_bytes<Dest>
- remove:
jule::utf8_rune_to_bytes
- fix: the
jule::env
function always returns empty slice after first use
Legacy Support
The old Jule source codes probably will not compile with this release. Because Jule 0.0.13 brings many breaking changes.
Some breaking changes:
std::process::{Cmd}
is reimplementedstd::fs::{Status}
is reimplemented
Jule 0.0.12
Language
- add: constraints for generic types
- add: explicit-typed slice literals with casting
- add: generic function instances can use as anonymous function now
- add: static methods can use as anonymous function now
- add: the built-in
delete
function - update: maps, slices, anonymous functions and binded defines are not comparable now
- update: syntax of map type declaration
- update: naming conventions
- update: use identifier based approach to define as public instead of using the
pub
keyword - update: the built-in
make
function for buffered strings - remove: the built-in
has
method of the map type, use lookup assignment instead - remove: the built-in
del
method of the map type, built-indelete
function instead - remove: the built-in
keys
, andvalues
methods of the map type
Compiler
- various improvements and optimizations
- various fixes and improvements for concurrent calls
- fix: code generation for cpp-linked fields
- fix: code generation for void-exceptional trait methods
- fix:
—opt-deadcode
removes necessary return statements of exceptional handling scopes - fix: code generation for floating-point constants, thanks to @mingodad for getting this noticed
- fix: code generation for initializing of structure field which is have cpp-linked structure type
- fix: compiler generates uninitialized arrays and slices
- fix: code generation for C/C++ linked headers
- fix & optimize: define ordering
- fix: code generation for binded include headers, thanks to @sparky4pro for pointing to the issue
- parser: improve catching of type declarations which is placed in expression
- sema: improve dynamic type annotation analysis
- sema: fix generic type-alias analysis
- sema: fix anonymous function analysis
- sema: fix trait implementation analysis
- sema: caught duplicated identifiers for full-import use declarations
- sema: fix analysis of constant structure fields
- sema: fix handling of constant values in casting evaluation
- sema: fix scope variable and scope type alias evaluation
- sema: fix evaluation of untyped constants
- sema: fix evaluation of function calls at global scope
- sema: fix compile-time panic call analysis
- sema: fix implicit casting
- sema: fix compiler might crash when analyzing parameters of genericed functions
- sema: fix variable declarations with blank identifier are allowed
Standard Library
- various improvements and optimizations
- add: std::maps
- add: std::net
- add: std::slices
- builtin: add the
len
, andcap
functions - builtin: remove the
len
andcap
fields from types and use thelen
andcap
functions instead - std::bytes: add the
Equal
function - std::slice: add the
Equal
function - std::io::
FileStream
’sReadLine
function returns string without is line delimiter now - std::io:: remove carriage return byte from the end if reading line-by-line
- std::time: reimplement the
Duration
- std::thread: move the
Thread.Sleep
method tostd::time
asSleep
function - std::jule::ast: add the
Constraint
field to theGenericDecl
- std::jule::ast: add the
IsCo
field to theFnCallExpr
- std::jule::ast: remove the
Generics
field of theFnCallExpr
- std::jule::ast: remove the
CoExpr
- std::jule::build: add the
ConstraintFailed
field to theLogMsg
- std::jule::constant: add the
Kind
field to theConst
- std::jule::sema: add the
InsGeneric
,BuiltinLenCallExprModel
,BuiltinCapCallExprModel
, andBuiltinDeleteCallExprModel
structs - std::jule::sema: use
InsGeneric
forGenerics
field ofFnIns
andStructIns
- std::jule::sema: add the
Statics
fields to theStructureIns
- std::jule::sema: add the
FindStatic
method to theStructureIns
- std::jule::sema: add the
IsConstraint
method to thePrim
- std::jule::sema: add the
Owner
field to theStructSubIdentExprModel
- std::jule::sema: remove the
ExprKind
field of theStructSubIdentExprModel
- std::jule::sema: fix implementation of the
PerformsRC
method of theTypeKind
- std::jule:sema: rename the
Equals
method asEqual
of theKind
trait - std::sys: add the
SOCK_STREAM
,SOCK_DGRAM
,SOCK_RDM
,SOCK_SEQPACKET
,AF_UNSPEC
,AF_UNIX
,AF_INET
,AF_INET6
,IPPROTO_IP
,IPPROTO_TCP
,IPPROTO_UDP
,INADDR_ANY
,INVALID_SOCKET
,SOCKET_ERROR
, and more constants - std::sys: add the
Sockaddr
,SockaddrIn
,SockaddrIn6
, andWsaData
structures - std::sys: add the
Socket
,Bind
,Connect
,Listen
,Accept
,Recv
,Send
,CloseSocket
,WSAStart
,MakeWord
, and more functions
API
- various optimizations
- mark as no-return the
jule::panic
function jule::MapKeyHasher
: fix copy assignment operator support- fix: use of uninitialized memory (missing zero terminator) on Linux, thanks to @mingodad for pointing to the issue (#104)
- fix: the
utf16_append_rune
- remove: the
__JULE_CO
, and__JULE_CO_SPAWN
macros - remove: equality functions of uncomparable types
- reimplement:
jule::Any
jule::Trait<Mask>
: minor optimizations
Legacy Support
The old Jule source codes probably will not compile with this release. Because Jule 0.0.12 brings many breaking changes.
Some breaking changes:
- Map syntax update
- Naming convention update
- Built-in
len
andcap
field update - Buffered string update for the built-in
make
function - Some reimplementations such as
std::time::Duration
- Some types are not comparable now like slices, maps, or anonymous functions
Known Issues
Apple released a new linker with Xcode 15. But the new linker sometimes causes compilation errors.
See more information