Constructors Shouldn't Throw
Constructors in programming should not throw exceptions, as it can lead to unpredictable object states. Instead, constructors should handle errors gracefully, promoting safer and more reliable code. (t3.at)
Free Pascal Compiler and the Lazarus IDE now provide full dynamic package support: packages are standard shared libraries for Linux, Windows, and macOS that include compiler-generated metadata enabling inspection and runtime management. The runtime and RTL were extended (including a new DynPkgTypes.pas unit) to enumerate, load, search and unload packages, and to safely preserve thread variables and dynamic types such as strings and dynamic arrays across package boundaries. Applications can either be bundled into a single executable or split into replaceable dynamic packages to build plugin systems. There are constraints: package unit names must be unique and a package’s source file is auto-renamed to append “Package”; dynamic packages are larger because of embedded maps and cannot be stripped without losing required metadata.
The Lazarus IDE received workflow enhancements to exploit packages: an external progress window for rebuilds, a dockable Packages window that persists recent packages, near-instant updates of installed components when a package is recompiled, and improved add/remove behavior that often avoids full IDE rebuilds. Package options can restrict platform or widgetset visibility, and a form/frame-to-control conversion feature creates installable visual components. The changes are available on GitLab branches for FPC and Lazarus with issue trackers for bugs; the project requests moderators and seeks access to an M1 mac for macOS builds.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.
Constructors in programming should not throw exceptions, as it can lead to unpredictable object states. Instead, constructors should handle errors gracefully, promoting safer and more reliable code. (t3.at)
OmniPTY is an opinionated terminal emulator for macOS and Linux that features splits, workspaces, a file tree, and an integrated prompt. It is GPU-rendered and written in Rust. (github.com)
Building personal software factories is a waste of time for most developers, as AI tools can accomplish similar goals more efficiently. Instead, focus on learning how AI models work and applying automation to work-related systems for tangible benefits. (peterp.me)
Mitos is a fork of Helix, a modal text editor with features like multi-cursor editing, syntax awareness, and built-in language tooling. It supports Rust development, debugging, image previews, and file navigation, and is open source under MPL-2.0. (mitos.computer)
Resonance is a spatial compositor that organizes windows on stacked levels, merging features of floating and tiling window managers. Built from scratch and used daily, it dynamically manages window placement based on depth and space, functioning as a custom display server on Wayland. (onewireout.com)
Java 17's sealed classes allow explicit listing of permitted subtypes, enabling exhaustive pattern matching without default clauses. Adding new subtypes is a breaking change that requires recompiling consumers to avoid runtime errors. (neilmadden.blog)
Today's best Hacker News stories, summarized and screenshotted, one email a day.