
Juntai Park
@arkjun@hackers.pub · 65 following · 82 followers
中年의 中小企業 開發者, 90年代 Console Gamer. 좋은 하루를 繼續해 나아간다. 좋은 하루가 모이면 좋은 人生이 된다.
韓国人のプログラマー、40代、小学生の息子とゲームするのが幸せ😃💕龍が如く 、ゼルダの伝説、マリオ、ピクミン好き
「いい1日を続ける」
いい1日を続けていけば、いい人生になる!
threads
- @rkjun
x
- @rkJun
uri.life
- @arkjun@uri.life
GitHub
- @arkjun
@hongminhee洪 民憙 (Hong Minhee)
@z9mb1wwj 저는 셸에서만 vi 를 사용하는 라이트 유저에 가깝긴 합니다만, 그래도 개발자들이 vi 에 대한 최소한의 사용방법은 숙지했으면 하는 바램은 있습니다. 😅 환경파일등 서버에서 즉시 수정할 일들이 그래도 종종 있다보니까요. 덤으로 브라우저에서의 vimmium 은 잘 쓰고 있습니다. 😆 https://github.com/philc/vimium
https://www.frontend.moe/posts/naver-2025-coding-test/ 팀네이버 코딩 테스트 후기를 개인 블로그에 올려두었습니다. 꾸준히 일할 수 있는 지속 가능한 소프트웨어 엔지니어로서의 삶을 지켜내고자 반성글을 쓰게 되었습니다(...)
@hongminhee洪 民憙 (Hong Minhee) 안그래도 설정하다가 그냥 vsc 쓰고 있어요 :( 말리시는 이유가 있을까요?
높은 목표를 가진 개발자라도 결국엔 아주 사소한 동기로 움직이는거 같다.
나같은 경우엔, 완벽한 프로그래밍 언어를 만드는 것이 목표인데(가능한지는 차치하고), 완벽하다는건 나말고 다른 누군가가 같은 문제 의식을 가진다면 똑같이 그곳에 다다를 거란걸 의미한다. 그 프로그래밍 언어의 설계에서 내 마음대로 결정할수 있는 부분은 없을 것이다. 설계에서 최적의 선택지만을 택해야 완벽할테니까 말이다. 그때가선 그 선택들이 너무 자명해서, 내겐 처음부터 선택의 여지가 없었다고 느낄것이다.
그럼에도 내가 결정할 수 있을 부분이 있기는한데, 그 언어의 이름에 뜬금없이 우리집 강아지 이름을 붙인다던가 하는 것이다. 이게 그 사소한 동기다.
@bglbgl gwyng 사이먼 페이튼 존스의 고양이 이름이 하스켈인데 고양이 이름이 먼저였을까요, 프로그래밍 언어 이름이 먼저였을까요?
높은 목표를 가진 개발자라도 결국엔 아주 사소한 동기로 움직이는거 같다.
나같은 경우엔, 완벽한 프로그래밍 언어를 만드는 것이 목표인데(가능한지는 차치하고), 완벽하다는건 나말고 다른 누군가가 같은 문제 의식을 가진다면 똑같이 그곳에 다다를 거란걸 의미한다. 그 프로그래밍 언어의 설계에서 내 마음대로 결정할수 있는 부분은 없을 것이다. 설계에서 최적의 선택지만을 택해야 완벽할테니까 말이다. 그때가선 그 선택들이 너무 자명해서, 내겐 처음부터 선택의 여지가 없었다고 느낄것이다.
그럼에도 내가 결정할 수 있을 부분이 있기는한데, 그 언어의 이름에 뜬금없이 우리집 강아지 이름을 붙인다던가 하는 것이다. 이게 그 사소한 동기다.
安寧하세요, 저는 서울에 살고 있는 30代 後半 오픈 소스 소프트웨어 엔지니어이며, 自由·오픈 소스 소프트웨어와 聯合宇宙(fediverse)의 熱烈한 支持者입니다.
저는 TypeScript用 ActivityPub 서버 프레임워크인 @fedifyFedify: ActivityPub server framework 프로젝트와 싱글 유저用 ActivityPub 마이크로블로그인
@holloHollo
프로젝트와 ActivityPub 봇 프레임워크인
@botkitBotKit by Fedify
프로젝트의 製作者이기도 합니다.
저는 東아시아 言語(이른바 #CJK)와 유니코드에도 關心이 많습니다. 聯合宇宙에서는 國漢文混用體를 쓰고 있어요! 제게 韓國語나 英語, 日本語로 말을 걸어주세요. (아니면, 漢文으로도!)
こんにちは、私はソウルに住んでいる30代後半のオープンソースソフトウェアエンジニアで、自由・オープンソースソフトウェアとフェディバースの熱烈な支持者です。名前は洪 民憙です。
私はTypeScript用のActivityPubサーバーフレームワークである「@fedifyFedify: ActivityPub server framework」と、ActivityPubをサポートする1人用マイクロブログである 「
@holloHollo
」と、ActivityPubのボットを作成する為のシンプルなフレームワークである「
@botkitBotKit by Fedify
」の作者でもあります。
私は東アジア言語(いわゆるCJK)とUnicodeにも興味が多いです。日本語、英語、韓国語で話しかけてください。(または、漢文でも!)
Hello, I'm an open source software engineer in my late 30s living in #Seoul, #Korea, and an avid advocate of #FLOSS and the #fediverse.
I'm the creator of @fedifyFedify: ActivityPub server framework, an #ActivityPub server framework in #TypeScript,
@holloHollo
, an ActivityPub-enabled microblogging software for single users, and
@botkitBotKit by Fedify
, a simple ActivityPub bot framework.
I'm also very interested in East Asian languages (so-called #CJK) and #Unicode. Feel free to talk to me in #English, #Korean (#한국어), or #Japanese (#日本語), or even in Literary Chinese (#文言文, #漢文)!
安寧하세요, 저는 서울에 살고 있는 30代 後半 오픈 소스 소프트웨어 엔지니어이며, 自由·오픈 소스 소프트웨어와 聯合宇宙(fediverse)의 熱烈한 支持者입니다.
저는 TypeScript用 ActivityPub 서버 프레임워크인 @fedifyFedify: ActivityPub server framework 프로젝트와 싱글 유저用 ActivityPub 마이크로블로그인
@holloHollo
프로젝트와 ActivityPub 봇 프레임워크인
@botkitBotKit by Fedify
프로젝트의 製作者이기도 합니다.
저는 東아시아 言語(이른바 #CJK)와 유니코드에도 關心이 많습니다. 聯合宇宙에서는 國漢文混用體를 쓰고 있어요! 제게 韓國語나 英語, 日本語로 말을 걸어주세요. (아니면, 漢文으로도!)
Hello, I'm an open source software engineer in my late 30s living in #Seoul, #Korea, and an avid advocate of #FLOSS and the #fediverse.
I'm the creator of @fedifyFedify: ActivityPub server framework, an #ActivityPub server framework in #TypeScript,
@holloHollo
, an ActivityPub-enabled microblogging software for single users, and
@botkitBotKit by Fedify
, a simple ActivityPub bot framework.
I'm also very interested in East Asian languages (so-called #CJK) and #Unicode. Feel free to talk to me in #English, #Korean (#한국어), or #Japanese (#日本語), or even in Literary Chinese (#文言文, #漢文)!
ActivityPub 구현들에서 인용을 하면 content
값에 자동으로 “RE: 인용된 글 링크” 또는 “QT: 인용된 글 링크 [参照]” 같은 식으로 덧붙이는 동작들을 하는데, 다행히 Akkoma나 Fedibird 등에서는 이를 .quote-inline
이나 .reference-link-inline
같은 클래스로 묶어줘서 CSS로 그것들을 가리는 게 가능하다. 그런데, 오직 Misskey만 그런 처리를 안 해줘서 CSS만으로 가릴 방법이 없다…
나두 해커스펍
아무래도 Hackers' Pub 가입 직후에 팔로 추천 탭을 보여주는 게 나을 것 같기도… 🤔
GN⁺: 스크립트에서는 긴 옵션을 사용합시다
------------------------------
- 많은 명령줄 유틸리티는 짧은 형식 옵션(-f
)과 긴 형식 옵션(--force
)을 지원함
- 짧은 형식은 대화형 사용을 위한 것임, 스크립트에서는 긴 형식을 사용할 것을 권장함
- 예를 들어, 터미널에서는 $ git switch -c my-new-branch
라고 입력함.
- 릴리스 스크립트에서는 다음과 같이 작성함:
- `try …
------------------------------
https://news.hada.io/topic?id=19905&utm_source=googlechat&utm_medium=bot&utm_campaign=1834
백준 관련해서 보다가 이런저런 프로젝트들이 많길래 모아놓는 저장소를 하나 팠다.
@gaeulbyul가을별 님, Hackers' Pub에 오신 것을 환영합니다!!
@z9mb1wwj
@arkjunJuntai Park 초대장 시스템을 만들길 잘했네요!
@hongminhee洪 民憙 (Hong Minhee)
@z9mb1wwj 이제 하루만 지나도 못 보고 지나치게 되는 글들이 생기네요. 🍻
환영 인사도 웬만하면 다 하려 했으나 이제 못할지도요. 😆
해커주점에 가입했습니다. 한잔해~
@fox여우 반갑습니다.🍻
디지털 가드닝에 관심이 많은 개발자입니다.
- 특히 위키 형식의 문서 관리, knowledge graph 구조의 시각화에 관심이 있어요.
- kodingwarrior.github.io/wiki
Neovim 이라는 텍스트 에디터에 굉장히 꽂혀있습니다.
- 과몰입한 나머지 플러그인까지 개발해본 경험이 있어요.
- 한국어권 개발자를 위한 Vim 디스코드를 운영중입니다 (vim.kr)
프로그래밍을 하는 행위 자체를 좋아합니다.
- 프로그래밍으로 퍼즐을 푸는 행위를 좋아했고, 비슷한 흔적을 가진 사람들에게 친밀감을 느낍니다.
해커스펍을 더 흥하게 할 수 있는 아이디어가 하나 더 생각났다,, 다음주 주말쯤에 보따리 봉인 풀어야지 캬캬캬
드디어 가입됐다
@catamorphicCata 안녕하세요. 환영합니다.
Juntai Park replied to the below article:
Hello World!

Liaizon Wakest @wakest@hackers.pub
This post serves as an introductory message to the Hackers' Pub community. The author expresses gratitude for being invited by @hongminhee and marks this as their initial contribution to the platform. It's a simple greeting to establish their presence and begin engaging with other members of the community.
Read more →@wakestLiaizon Wakest Welcome to Hackers' Pub!
@arkjunJuntai Park 요즘 모든 웹사이트가 테두리가 다 둥글길래 일부러 네모지게 만들고 있긴 합니다… ㅋㅋㅋ
@hongminhee洪 民憙 (Hong Minhee) 크. 역시 의도된 연출이었군요. 😎
이제 인용을 만들 차례다…
@hongminhee洪 民憙 (Hong Minhee) 오오 환영입니다. 프로필이나 박스, 이미지 등의 라운딩 처리도 요청하고 싶으나, 개인 취향의 영역에 가까워 강력하게 요청하기는 어렵군요. 😂
두둥 뉴비 등장,,!
@dogpoop2dev박소예 어서오세요
뉴비는 언제나 환영입니다.
개발자 한 100명 정도 해커스펍에 오면 사실상 트위터 개발자 타임라인이랑 비슷한 리젠율 찍을듯
HackersPub을 통해 개발자들 위주로 연합우주 타임라인이 계속 핫해질듯...!!!
그동안(10+년;;) git이 엄청 잘만든 물건 같지는 않다고 생각하며 대충 쓰고있었는데, 요즘 branch 개념 자체가 근본적인 실수란 생각이 들기 시작했다. branch 대신에 변경의 시작과 끝, 양 끝점을 가지는 interval을 쓰는게 맞는거 같다(카테고리 이론의 작은 교훈: primitive는 양 끝점을 가지는게 좋다).
git을 쓰면 히스토리 길어진다고 squash merge 등을 하는데, (나도 하지만) 사실 기껏 만들어놓은 히스토리를 뭉개버리는 말도 안되는 동작이다. 만약 interval을 쓴다면 히스토리는 그대로 남기고 UI 단에서 fold/unfold 등을 해줄수 있을 것이다.
Darcs 등이 interval에 기초하는데, 지금은 일이 너무 바빠서 시도할 여유가 없다. 한번 숨고를 시간이 주어지면 멀쩡한 VCS를 탐색하는 시간을 가질것이다.
@iamuhun김무훈 무훈 님, 어서오세요! 오랜만입니다.
@hongminhee洪 民憙 (Hong Minhee)
@iamuhun김무훈 어서오세요. 환영합니다. 👋
해커펍은 퍼머링크로 아카이빙 참조하기 최적이라 생각해서 앞으로 기술을 다루며 기록 및 참조하는 용도로 잘 사용하려고 합니다.
트위터는 나중에 다른 사람에게 보여줄 참조용으로 쓰기에는 너무 정보 대비 소음이 많은 특성 때문에 잘 맞지 않는다고 생각합니다.
📢 Hackers' Pub 招待システムオープン!
Hackers' Pub に招待システムが適用されました。これで設定→招待ページから知人を招待できます。
主な内容:
- 招待状3枚支給:既存会員の皆様には3枚の招待状が支給されました。
- 招待方法:設定→招待ページで招待リンクを作成して共有するか、メールアドレスを入力して招待できます。
- 追加招待:招待状は今後不定期に追加される予定です。
- 自動フォロー:招待者と被招待者は自動的に相互フォローされます。(フォロー解除可能)
Hackers' Pub のクオリティを維持し、より豊かな技術議論のために慎重な招待をお願いいたします。
ご不明な点やご要望は、この投稿への返信としてお寄せください。
Hackers' Pub コミュニティの成長にご協力をお願いいたします!
@hongminhee洪 民憙 (Hong Minhee) 招待システムのオープンを機に、hackers.pub がさらに賑やかになることを願っています!開発者の日常や、初心者から上級者まで役立つ情報がたくさん集まる場になるといいですね😂微力ながら、私も力を添えられたらと思います😆
📢 Hackers' Pub 초대 시스템 오픈!
Hackers' Pub에 초대 시스템이 적용되었습니다. 이제 설정 → 초대 페이지에서 지인들을 초대할 수 있습니다.
주요 내용:
- 초대장 3장 지급: 기존 회원분들께 3장의 초대장이 지급되었습니다.
- 초대 방법: 설정 → 초대 페이지에서 초대 링크를 생성하여 공유하거나, 이메일 주소를 입력하여 초대할 수 있습니다.
- 추가 초대: 초대장은 향후 비정기적으로 추가될 예정입니다.
- 자동 팔로: 초대자와 피초대자는 자동으로 상호 팔로됩니다. (언팔로 가능.)
Hackers' Pub의 퀄리티를 유지하고, 더욱 풍성한 기술 논의를 위해 신중한 초대를 부탁드립니다.
궁금한 점이나 건의사항은 답글로 남겨주세요.
Hackers' Pub 커뮤니티 성장에 많은 참여 부탁드립니다!
📢 Hackers' Pub 招待システムオープン!
Hackers' Pub に招待システムが適用されました。これで設定→招待ページから知人を招待できます。
主な内容:
- 招待状3枚支給:既存会員の皆様には3枚の招待状が支給されました。
- 招待方法:設定→招待ページで招待リンクを作成して共有するか、メールアドレスを入力して招待できます。
- 追加招待:招待状は今後不定期に追加される予定です。
- 自動フォロー:招待者と被招待者は自動的に相互フォローされます。(フォロー解除可能)
Hackers' Pub のクオリティを維持し、より豊かな技術議論のために慎重な招待をお願いいたします。
ご不明な点やご要望は、この投稿への返信としてお寄せください。
Hackers' Pub コミュニティの成長にご協力をお願いいたします!
📢 Hackers' Pub 초대 시스템 오픈!
Hackers' Pub에 초대 시스템이 적용되었습니다. 이제 설정 → 초대 페이지에서 지인들을 초대할 수 있습니다.
주요 내용:
- 초대장 3장 지급: 기존 회원분들께 3장의 초대장이 지급되었습니다.
- 초대 방법: 설정 → 초대 페이지에서 초대 링크를 생성하여 공유하거나, 이메일 주소를 입력하여 초대할 수 있습니다.
- 추가 초대: 초대장은 향후 비정기적으로 추가될 예정입니다.
- 자동 팔로: 초대자와 피초대자는 자동으로 상호 팔로됩니다. (언팔로 가능.)
Hackers' Pub의 퀄리티를 유지하고, 더욱 풍성한 기술 논의를 위해 신중한 초대를 부탁드립니다.
궁금한 점이나 건의사항은 답글로 남겨주세요.
Hackers' Pub 커뮤니티 성장에 많은 참여 부탁드립니다!
@hongminhee洪 民憙 (Hong Minhee) 초대 시스템 오픈을 계기로 더 풍성한 hackers.pub 이 되기를
응원합니다. 개발자들의 소소한 일상이나, 초심자를 비롯해 숙련자를 위한 정보들도 가득했으면 좋겠어요. 😂 그러기 위해 저도 부족하나마 힘을 보태보겠습니다. 😆
📢 Hackers' Pub 초대 시스템 오픈!
Hackers' Pub에 초대 시스템이 적용되었습니다. 이제 설정 → 초대 페이지에서 지인들을 초대할 수 있습니다.
주요 내용:
- 초대장 3장 지급: 기존 회원분들께 3장의 초대장이 지급되었습니다.
- 초대 방법: 설정 → 초대 페이지에서 초대 링크를 생성하여 공유하거나, 이메일 주소를 입력하여 초대할 수 있습니다.
- 추가 초대: 초대장은 향후 비정기적으로 추가될 예정입니다.
- 자동 팔로: 초대자와 피초대자는 자동으로 상호 팔로됩니다. (언팔로 가능.)
Hackers' Pub의 퀄리티를 유지하고, 더욱 풍성한 기술 논의를 위해 신중한 초대를 부탁드립니다.
궁금한 점이나 건의사항은 답글로 남겨주세요.
Hackers' Pub 커뮤니티 성장에 많은 참여 부탁드립니다!
@curry박준규 확장이 하도 많아서 뭐가 있는지 다 알기가 어려운 것 같아요… 😂
@hongminhee洪 民憙 (Hong Minhee) 이런 표현이 있습니다.
GHC has more flags than the UN.
https://github.com/dahlia/hackerspub/pull/12
해커스펍의 멘션 기능에 가독성 개선이 필요할 것 같아서 제안하는 느낌으로 PR은 올렸는데, 다른 분들도 어떤 의견을 가지고 계실지 모르겠다
仮名もハングルも表音文字だから日本語の文章をハングルで表記できそうと思ったらそれっぽいのがもうあった
https://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%AE%E3%83%8F%E3%83%B3%E3%82%B0%E3%83%AB%E8%A1%A8%E8%A8%98
Juntai Park shared the below article:
Revisiting Java's Checked Exceptions: An Underappreciated Type Safety Feature

洪 民憙 (Hong Minhee) @hongminhee@hackers.pub
Despite their bad reputation in the Java community, checked exceptions provide superior type safety comparable to Rust's Result<T, E>
or Haskell's Either a b
—we've been dismissing one of Java's best features all along.
Introduction
Few features in Java have been as consistently criticized as checked exceptions. Modern Java libraries and frameworks often go to great lengths to avoid them. Newer JVM languages like Kotlin have abandoned them entirely. Many experienced Java developers consider them a design mistake.
But what if this conventional wisdom is wrong? What if checked exceptions represent one of Java's most forward-thinking features?
In this post, I'll argue that Java's checked exceptions were ahead of their time, offering many of the same type safety benefits that are now celebrated in languages like Rust and Haskell. Rather than abandoning this feature, we should consider how to improve it to work better with modern Java's features.
Understanding Java's Exception Handling Model
To set the stage, let's review how Java's exception system works:
-
Unchecked exceptions (subclasses of
RuntimeException
orError
): These don't need to be declared or caught. They typically represent programming errors (NullPointerException
,IndexOutOfBoundsException
) or unrecoverable conditions (OutOfMemoryError
). -
Checked exceptions (subclasses of
Exception
but notRuntimeException
): These must either be caught withtry
/catch
blocks or declared in the method signature withthrows
. They represent recoverable conditions that are outside the normal flow of execution (IOException
,SQLException
).
Here's how this works in practice:
// Checked exception - compiler forces you to handle or declare it
public void readFile(String path) throws IOException {
Files.readAllLines(Path.of(path));
}
// Unchecked exception - no compiler enforcement
public void processArray(int[] array) {
int value = array[array.length + 1]; // May throw ArrayIndexOutOfBoundsException
}
The Type Safety Argument for Checked Exceptions
At their core, checked exceptions are a way of encoding potential failure modes into the type system via method signatures. This makes certain failure cases part of the API contract, forcing client code to explicitly handle these cases.
Consider this method signature:
public byte[] readFileContents(String filePath) throws IOException
The throws IOException
clause tells us something critical: this method might fail in ways related to IO operations. The compiler ensures you can't simply ignore this fact. You must either:
- Handle the exception with a try-catch block
- Propagate it by declaring it in your own method signature
This type-level representation of potential failures aligns perfectly with principles of modern type-safe programming.
Automatic Propagation: A Hidden Advantage
One often overlooked advantage of Java's checked exceptions is their automatic propagation. Once you declare a method as throws IOException
, any exception that occurs is automatically propagated to the caller without additional syntax.
Compare this with Rust, where you must use the ?
operator every time you call a function that returns a Result
:
// Rust requires explicit propagation with ? for each call
fn read_and_process(path: &str) -> Result<(), std::io::Error> {
let content = std::fs::read_to_string(path)?;
process_content(&content)?;
Ok(())
}
// Java automatically propagates exceptions once declared
void readAndProcess(String path) throws IOException {
String content = Files.readString(Path.of(path));
processContent(content); // If this throws IOException, it's automatically propagated
}
In complex methods with many potential failure points, Java's approach leads to cleaner code by eliminating the need for repetitive error propagation markers.
Modern Parallels: Result Types in Rust and Haskell
The approach of encoding failure possibilities in the type system has been adopted by many modern languages, most notably Rust with its Result<T, E>
type and Haskell with its Either a b
type.
In Rust:
fn read_file_contents(file_path: &str) -> Result<Vec<u8>, std::io::Error> {
std::fs::read(file_path)
}
When calling this function, you can't just ignore the potential for errors—you need to handle both the success case and the error case, often using the ?
operator or pattern matching.
In Haskell:
readFileContents :: FilePath -> IO (Either IOException ByteString)
readFileContents path = try $ BS.readFile path
Again, the caller must explicitly deal with both possible outcomes.
This is fundamentally the same insight that motivated Java's checked exceptions: make failure handling explicit in the type system.
Valid Criticisms of Checked Exceptions
If checked exceptions are conceptually similar to these widely-praised error handling mechanisms, why have they fallen out of favor? There are several legitimate criticisms:
1. Excessive Boilerplate in the Call Chain
The most common complaint is the boilerplate required when propagating exceptions up the call stack:
void methodA() throws IOException {
methodB();
}
void methodB() throws IOException {
methodC();
}
void methodC() throws IOException {
// Actual code that might throw IOException
}
Every method in the chain must declare the same exception, creating repetitive code. While automatic propagation works well within a method, the explicit declaration in method signatures creates overhead.
2. Poor Integration with Functional Programming
Java 8 introduced lambdas and streams, but checked exceptions don't play well with them:
// Won't compile because map doesn't expect functions that throw checked exceptions
List<String> fileContents = filePaths.stream()
.map(path -> Files.readString(Path.of(path))) // Throws IOException
.collect(Collectors.toList());
This forces developers to use awkward workarounds:
List<String> fileContents = filePaths.stream()
.map(path -> {
try {
return Files.readString(Path.of(path));
} catch (IOException e) {
throw new UncheckedIOException(e); // Wrap in an unchecked exception
}
})
.collect(Collectors.toList());
3. Interface Evolution Problems
Adding a checked exception to an existing method breaks all implementing classes and calling code. This makes evolving interfaces over time difficult, especially for widely-used libraries and frameworks.
4. Catch-and-Ignore Anti-Pattern
The strictness of checked exceptions can lead to the worst possible outcome—developers simply catching and ignoring exceptions to make the compiler happy:
try {
// Code that might throw
} catch (Exception e) {
// Do nothing or just log
}
This is worse than having no exception checking at all because it provides a false sense of security.
Improving Checked Exceptions Without Abandoning Them
Rather than abandoning checked exceptions entirely, Java could enhance the existing system to address these legitimate concerns. Here are some potential improvements that preserve the type safety benefits while addressing the practical problems:
1. Allow lambdas to declare checked exceptions
One of the biggest pain points with checked exceptions today is their incompatibility with functional interfaces. Consider how much cleaner this would be:
// Current approach - forced to handle or wrap exceptions inline
List<String> contents = filePaths.stream()
.map(path -> {
try {
return Files.readString(Path.of(path));
} catch (IOException e) {
throw new RuntimeException(e);
}
})
.collect(Collectors.toList());
// Potential future approach - lambdas can declare exceptions
List<String> contents = filePaths.stream()
.map((String path) throws IOException -> Files.readString(Path.of(path)))
.collect(Collectors.toList());
This would require updating functional interfaces to support exception declarations:
@FunctionalInterface
public interface Function<T, R, E extends Exception> {
R apply(T t) throws E;
}
2. Generic exception types in throws clauses
Another powerful enhancement would be allowing generic type parameters in throws
clauses:
public <E extends Exception> void processWithException(Supplier<Void, E> supplier) throws E {
supplier.get();
}
This would enable much more flexible composition of methods that work with different exception types, bringing some of the flexibility of Rust's Result<T, E>
to Java's existing exception system.
3. Better support for exception handling in functional contexts
Unlike Rust which requires the ?
operator for error propagation, Java already automatically propagates checked exceptions when declared in the method signature. What Java needs instead is better support for checked exceptions in functional contexts:
// Current approach for handling exceptions in streams
List<String> contents = filePaths.stream()
.map(path -> {
try {
return Files.readString(Path.of(path));
} catch (IOException e) {
throw new RuntimeException(e); // Lose type information
}
})
.collect(Collectors.toList());
// Hypothetical improved API
List<String> contents = filePaths.stream()
.mapThrowing(path -> Files.readString(Path.of(path))) // Preserves checked exception
.onException(IOException.class, e -> logError(e))
.collect(Collectors.toList());
4. Integration with Optional<T>
and Stream<T>
APIs
The standard library could be enhanced to better support operations that might throw checked exceptions:
// Hypothetical API
Optional<String> content = Optional.ofThrowable(() -> Files.readString(Path.of("file.txt")));
content.ifPresentOrElse(
this::processContent,
exception -> log.error("Failed to read file", exception)
);
Comparison with Other Languages' Approaches
It's worth examining how other languages have addressed the error handling problem:
Rust's Result<T, E>
and ?
operator
Rust's approach using Result<T, E>
and the ?
operator shows how propagation can be made concise while keeping the type safety benefits. The ?
operator automatically unwraps a successful result or returns the error to the caller, making propagation more elegant.
However, Rust's approach requires explicit propagation at each step, which can be more verbose than Java's automatic propagation in certain scenarios.
Kotlin's Approach
Kotlin made all exceptions unchecked but provides functional constructs like runCatching
that bring back some type safety in a more modern way:
val result = runCatching {
Files.readString(Path.of("file.txt"))
}
result.fold(
onSuccess = { content -> processContent(content) },
onFailure = { exception -> log.error("Failed to read file", exception) }
)
This approach works well with Kotlin's functional programming paradigm but lacks compile-time enforcement.
Scala's Try[T]
, Either[A, B]
, and Effect Systems
Scala offers Try[T]
, Either[A, B]
, and various effect systems that encode errors in the type system while integrating well with functional programming:
import scala.util.Try
val fileContent: Try[String] = Try {
Source.fromFile("file.txt").mkString
}
fileContent match {
case Success(content) => processContent(content)
case Failure(exception) => log.error("Failed to read file", exception)
}
This approach preserves type safety while fitting well with Scala's functional paradigm.
Conclusion
Java's checked exceptions were a pioneering attempt to bring type safety to error handling. While the implementation has shortcomings, the core concept aligns with modern type-safe approaches to error handling in languages like Rust and Haskell.
Copying Rust's Result<T, E>
might seem like the obvious solution, but it would represent a radical departure from Java's established paradigms. Instead, targeted enhancements to the existing checked exceptions system—like allowing lambdas to declare exceptions and supporting generic exception types—could preserve Java's unique approach while addressing its practical limitations.
The beauty of such improvements is that they'd maintain backward compatibility while making checked exceptions work seamlessly with modern Java features like lambdas and streams. They would acknowledge that the core concept of checked exceptions was sound—the problem was in the implementation details and their interaction with newer language features.
So rather than abandoning checked exceptions entirely, perhaps we should recognize them as a forward-thinking feature that was implemented before its time. As Java continues to evolve, we have an opportunity to refine this system rather than replace it.
In the meantime, next time you're tempted to disparage checked exceptions, remember: they're not just an annoying Java quirk—they're an early attempt at the same type safety paradigm that newer languages now implement with much celebration.
What do you think? Could these improvements make checked exceptions viable for modern Java development? Or is it too late to salvage this controversial feature? I'm interested in hearing your thoughts in the comments.
자바의 체크드 예외 재고찰: 저평가된 타입 안전성 기능
------------------------------
## 주요 내용 요약
* 자바의 체크드 예외가 커뮤니티에서 널리 비판받는 기능임에도 타입 안전성 측면에서 뛰어난 장점 보유.
* Rust의 Result<T, E>
나 Haskell의 Either a b
와 개념적으로 유사한 타입 안전성 메커니즘 제공.
* 체크드 예외가 메서드 시그니처에 잠재적 실패 가능성을 명시적으로 표현하…
------------------------------
https://news.hada.io/topic?id=19877&utm_source=googlechat&utm_medium=bot&utm_campaign=1834
@arkjunJuntai Park 아… 그럼 Threads의 주제는 ActivityPub 상에서 마크업이 되진 않는 것 같네요. Threads 내부에서만 활용 가능한 기능인가 봅니다. 참고로 이찬진 님의 해당 글은 Activity Streams 객체로 아래와 같이 표현되고 있습니다:
{
"id": "https://threads.net/ap/users/17841400639660143/post/17976118301827877/",
"type": "Note",
"content": "<p>이제 스레드의 '주제(Topic)' 기능을 '해시태그'라고 부를 수 없겠네요. <br /><br />게시물 작성 화면에서 '해시태그'를 의미하는 '#' 버튼이 없어졌고 대신 '주제 추가' 버튼이 들어갔습니다. <br /><br />물론 전에 '해시태그'와 비슷하게 보일 때에도<br /><br />- 게시물에 하나 밖에 쓸 수 없었고<br />- 태그에 스페이스를 쓸 수 있었고<br />- '#'이 없었으니<br /><br />정확하게 해시태그는 아니었지만 이제는 입력하는 방법도 그렇고 표시되는 위치도 그렇고 확실히 '주제' 기능이라고 불러야겠네요.<br />#스레드 개선</p>",
"published": "2025-03-20T18:35:52-07:00",
"contentMap": {
"ko": "<p>이제 스레드의 '주제(Topic)' 기능을 '해시태그'라고 부를 수 없겠네요. <br /><br />게시물 작성 화면에서 '해시태그'를 의미하는 '#' 버튼이 없어졌고 대신 '주제 추가' 버튼이 들어갔습니다. <br /><br />물론 전에 '해시태그'와 비슷하게 보일 때에도<br /><br />- 게시물에 하나 밖에 쓸 수 없었고<br />- 태그에 스페이스를 쓸 수 있었고<br />- '#'이 없었으니<br /><br />정확하게 해시태그는 아니었지만 이제는 입력하는 방법도 그렇고 표시되는 위치도 그렇고 확실히 '주제' 기능이라고 불러야겠네요.<br />#스레드 개선</p>"
},
"attributedTo": "https://threads.net/ap/users/17841400639660143/",
"url": "https://www.threads.net/@chanjin65/post/DHcXMcczYx6",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://threads.net/ap/users/17841400639660143/followers/"
],
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"tag": [],
"attachment": [
{
"type": "Image",
"url": "https://scontent-ssn1-1.cdninstagram.com/v/t51.75761-15/485651795_17904023592105580_5390283833466719793_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=104&ccb=1-7&_nc_sid=18de74&_nc_ohc=Ds02qFOIJUUQ7kNvgGjxYCA&_nc_oc=AdnVGfWmGdOHV2sZAvWtcv1M0iaLjV4A-RbC0lDI_hgvwYrnt69HjBGo_js8NkvX6T0&_nc_zt=23&_nc_ht=scontent-ssn1-1.cdninstagram.com&edm=AMJMky4EAAAA&_nc_gid=dudtlAu0RjYNhaifxVdB_Q&oh=00_AYG5YaNk9YbLpECGixfB74Lgi9-VSZhhYWByBvTi6lGBaw&oe=67E29C5A",
"name": "Photo by 이차지 on March 20, 2025. 사람 1명, 화면 및 문구: '10:26 취소 새로운 스레드 베타 베타·페디버스에공유합니다. 페디버스메 공유합니 chanjin65 chanjin650>7 이>주제추7 스레드에추가 누구에게나답글및인용허용 인용허용 N ㅂ 2 天 世 3 C 4 ٦ 5 人 6 Η ㅔ ㅁ니ㅇ리ㅎ 2 ᄒ @ ١ ᄏ ㅏ E 天 ㅍ T AAA 123 간격 AH KIy'의 Twitter 스크린샷일 수 있음.",
"width": 1125,
"height": 2436
}
]
}
@hongminhee洪 民憙 (Hong Minhee) 본문에 포함시켜서
content
(또는 contentMap.ko
) 마지막에 덧붙여서 넣는군요. 😅
@arkjunJuntai Park ActivityPub으로는 여전히
Hashtag
로 될 것 같긴 한데 실제로 주제를 건 게시물의 예시를 봐야 알 수 있겠네요… 혹시 주제를 건 Threads 게시물이 보이면 제보 부탁드립니다. ㅎㅎㅎ
@hongminhee洪 民憙 (Hong Minhee) 제가 링크를 넣은 찬진님의 글에 이미 주제가 포함되어 있습니다. 해커즈펍에서는 글 마지막에
#스레드 개선
이렇게 붙어서 나오네요.
스레드에 주제 (Topic) 기능이 추가되었습니다. 다만 연합우주(페디버스)에서는 해시태그로 보이는 듯 합니다.
https://hackers.pub/@chanjin65@threads.net/0195b665-a214-7309-9fc6-850bf13588db
이제 스레드의 '주제(Topic)' 기능을 '해시태그'라고 부를 수 없겠네요.<게시물 작성 화면에서 '해시태그'를 의미하는 '#' 버튼이 없어졌고 대신 '주제 추가' 버튼이 들어갔습니다.<물론 전에 '해시태그'와 비슷하게 보일 때에도- 게시물에 하나 밖에 쓸 수 없었고- 태그에 스페이스를 쓸 수 있었고- '#'이 없었으니정확하게 해시태그는 아니었지만 이제는 입력하는 방법도 그렇고 표시되는 위치도 그렇고 확실히 '주제' 기능이라고 불러야겠네요.#스레드 개선
이제 스레드의 '주제(Topic)' 기능을 '해시태그'라고 부를 수 없겠네요.<게시물 작성 화면에서 '해시태그'를 의미하는 '#' 버튼이 없어졌고 대신 '주제 추가' 버튼이 들어갔습니다.<물론 전에 '해시태그'와 비슷하게 보일 때에도- 게시물에 하나 밖에 쓸 수 없었고- 태그에 스페이스를 쓸 수 있었고- '#'이 없었으니정확하게 해시태그는 아니었지만 이제는 입력하는 방법도 그렇고 표시되는 위치도 그렇고 확실히 '주제' 기능이라고 불러야겠네요.#스레드 개선
hackers.pub
Link author: 이찬진@chanjin65@threads.net
모든 자바스크립트 개발자들이 단 하나의 패키지 매니저와 단 하나의 빌드 시스템, 단 하나의 모듈 시스템을 사용하면 좋겠다고 진심으로 생각한다
@parksbSimon Park 사견으로는 그냥 다들 Deno를 썼으면 좋겠네요…
@hongminhee洪 民憙 (Hong Minhee)
@parksbSimon Park
개인적으로 Node 프로젝트 때 써본 마지막의 경험으론 패키지 매니저는 pnpm 이 체감상 제일 빠른 느낌이었는데 요즘은 어떤지 궁금하네요.
다들 썼으면 하는 말씀을 해주시니 Deno 도 도전해보고 싶군요.
모든 자바스크립트 개발자들이 단 하나의 패키지 매니저와 단 하나의 빌드 시스템, 단 하나의 모듈 시스템을 사용하면 좋겠다고 진심으로 생각한다
@parksbSimon Park 사견으로는 그냥 다들 Deno를 썼으면 좋겠네요…
- 처음 써 보는 조용한 공개. 조용한 공개는 일반 공개와 뭐가 다를까. 연합 우주에는 올라가지 않는 거려나?
- 블스 연동을 했는데 hackers.pub 프로필에 쓴 텍스트가 블스 프로필로는 다 옮겨지지 않는다. 글자 수 제한이 있는 걸까요.
- 앱 지면을 무슨 아마존처럼 탐험하며 여기도 광고 넣을 수 있겠다! 저기도! 하는 흐름에 현기증이 난다. 이게 우리 회사 임원인지 사모펀드인지⋯.
- 마라톤 행사만 끝나고 나면 이것저것 해 보고 싶은 게 많은데.
@linear “조용한 공개”는 “공개”와 거의 모든 면에서 같지만 로그인 안 했을 때 Hackers' Pub 첫 화면에서 보이지 않는다는 점, 외부 연합우주 서버에서 “연합 타임라인”에 뜨지 않는다는 점만 달라요.
@hongminhee洪 民憙 (Hong Minhee) 깔끔하고 보기 편해 좋네요. 👍
이제 단문에 포함된 대표 링크에 대해 Open Graph 메타데이터를 추출하여 표시하게 되었습니다. 또한, 링크에 fediverse:creator
메타데이터가 있을 경우, 저자의 연합우주 프로필까지 하단에 표시하게 됩니다.
小学生の頃から英語の勉強としてWindowsを英語版で使っていたのだが、それが英語の勉強に少しは役立った気がする。
@hongminhee洪 民憙 (Hong Minhee) 息子のパソコンに適用を検討してみようと思います。(冗談) あの子が直接、適用してほしいなぁ😂
참고로 Hackers' Pub은 대부분의 경우 Fedify의 bleeding edge 버전을 쓰고 있습니다.
오늘 하려던 Fedify 작업은 얼추 끝내서, 다시 Hackers' Pub 작업에 손을 댑니다.