frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Toward Nirvana with Optional Parameters

https://github.com/manifold-systems/manifold/blob/master/manifold-deps-parent/manifold-params/README.md
1•owlstuffing•1d ago
Hey HN!

Oracle refuses to add optional parameters (and named args) to Java. So I did via a javac plugin and a smidge of hacking to modify the AST. The result is a pretty comprehensive implementation of the feature, without breaking binary compatibility. Here's a short summary.

---

The manifold-params compiler plugin adds support for optional parameters and named arguments in Java methods, constructors, and records -- offering a simpler, more expressive alternative to method overloading and builder patterns.

    public String valueOf(char[] data, 
                          int offset = 0, 
                          int count = data.length - offset) {...}

    valueOf(array) // use defaults for offset and count
    valueOf(array, 2) // use default for count
    valueOf(array, count:20) // use default for offset by naming count
This plugin supports JDK versions 8 - 21+ and integrates seamlessly with IntelliJ IDEA and Android Studio.

Key features:

- Optional parameters -- Define default values directly in methods, constructors, and records

- Named arguments -- Call methods using parameter names for clarity and flexibility

- Flexible defaults -- Use expressions, reference earlier parameters, and access local methods and fields

- Customizable behavior -- Override default values in subclasses or other contexts

- Safe API evolution -- Add parameters or change defaults without breaking binary or source compatibility

- Eliminates overloads and builders -- Collapse boilerplate into a single, expressive method or constructor

- IDE-friendly -- Fully supported in IntelliJ IDEA and Android Studio

Learn more: https://github.com/manifold-systems/manifold/blob/master/man...

Air India disaster is first fatal Boeing 787 accident

https://www.reuters.com/world/india/air-india-disaster-is-first-fatal-boeing-787-accident-2025-06-12/
1•rawgabbit•38s ago•0 comments

Time Is Not the Thief

https://ashleyjanssen.com/time-is-not-the-thief/
1•mooreds•1m ago•0 comments

The Secrets of the Man Who Made Nvidia the Most Valuable Company

https://www.wsj.com/business/nvidia-jensen-huang-book-advice-b9794576
1•baxtr•3m ago•1 comments

Epic Effort to Ground Physics in Math Opens Up the Secrets of Time

https://www.quantamagazine.org/epic-effort-to-ground-physics-in-math-opens-up-the-secrets-of-time-20250611/
1•rbanffy•3m ago•0 comments

Seedance 1.0

https://seed.bytedance.com/en/seedance
2•matallo•5m ago•0 comments

Random Walk: A Modern Introduction [pdf]

https://www.math.uchicago.edu/~lawler/srwbook.pdf
1•Anon84•6m ago•0 comments

It took longer to get the API key

https://algarch.com/blog/the-api-keys-took-longer-than-the-code-why-human-processes-are-the-real-bottleneck-in-ai-development
1•jdalton•7m ago•1 comments

Mill a JVM build tool based on pure functional programming [video]

https://www.youtube.com/watch?v=GBPRmMjpAEk
1•lihaoyi•7m ago•0 comments

Flight carrying 242 people bound for London has crashed in Ahmedabad, India

https://www.npr.org/2025/06/12/nx-s1-5431419/air-india-crash-787-boeing-ahmedabad
5•sizzle•8m ago•0 comments

Apollo Docking Sequence – Connecting the Command Module to the LEM [video]

https://www.youtube.com/watch?v=4drYZcMY9jU
1•lisper•8m ago•0 comments

Firefox Developer Edition

https://www.mozilla.org/en-US/firefox/developer/
1•mooreds•11m ago•0 comments

Waymo rides cost more than Uber or Lyft – and people are paying anyway

https://techcrunch.com/2025/06/12/waymo-rides-cost-more-than-uber-or-lyft-and-people-are-paying-anyway/
2•achristmascarl•12m ago•0 comments

Create AI videos with Seedance Pro – from text or image

https://www.seedancepro.com
1•cy2025421•12m ago•1 comments

Ask HN: Why the Hate Toward XLibre?

1•mikece•12m ago•0 comments

Largest 1 MW/100 MWh sand battery commissioned in Finland

https://www.pv-magazine.com/2025/06/11/worlds-largest-1-mw-100-mwh-sand-battery-commissioned-in-finland/
2•sasvari•12m ago•0 comments

Evidence of Accelerated Aging in Children with Multiple Sclerosis

https://today.ucsd.edu/story/uc-san-diego-researchers-find-evidence-of-accelerated-aging-in-children-with-multiple-sclerosis
1•gmays•12m ago•0 comments

I Created a Better Office.com

https://www.perspectives.plus/p/i-created-a-better-office-com
1•jukkan•13m ago•0 comments

Iconic icons to showcase your skills

https://github.com/YuheshPandian/ICONIC
1•Yuhesh•17m ago•0 comments

Transformation-Based Learning for POS Tagging

https://elijahpotter.dev/articles/transformation-based_learning
1•chilipepperhott•18m ago•0 comments

Marking the 20th anniversary of Steve's Stanford address

https://stevejobsarchive.com/exhibits/stay-hungry-stay-foolish
2•scripper•19m ago•0 comments

Supply Chain Resilience Is More Important Than Ever – Communications of the ACM

https://cacm.acm.org/blogcacm/supply-chain-resilience-is-more-important-than-ever/
1•rbanffy•20m ago•0 comments

Google faces billion-quid bruising over Play Store fees in the UK

https://www.theregister.com/2025/06/12/google_play_store_fees/
1•rntn•20m ago•0 comments

Tell HN: AI Is Boring Now

2•openaisucks•20m ago•0 comments

US's largest solar and storage project [Bellefield] 50% complete

https://electrek.co/2025/06/11/the-us-largest-solar-storage-project-just-hit-a-big-milestone/
1•toomuchtodo•21m ago•1 comments

AI logistics startup with $900k in revenue looking for biz dev / sales pro

https://airtable.com/appFlymREuqKWukEv/pagSaLLA6OTUJFFCl/form
1•jfromtheblock•22m ago•2 comments

Apple II: Launched June 10, 1977

https://dfarq.homeip.net/apple-ii-launched-june-10-1977/
1•rbanffy•22m ago•0 comments

Chinese Spyware, Only $6.99

https://www.wsj.com/opinion/nebraska-lawsuit-china-temu-pinduoduo-mike-hilgers-5767054b
2•thm•23m ago•0 comments

Want to build planetary-scale infrastructure with embodied AI?

https://aim.vision/#careers
3•machines_run•24m ago•1 comments

Five Phone Stories [video]

https://www.youtube.com/watch?v=ympjaibY6to
1•toomuchtodo•24m ago•0 comments

Metabolic adaptations direct cell fate during tissue regeneration

https://www.nature.com/articles/s41586-025-09097-6
2•bookofjoe•25m ago•0 comments