---
title: "huda elhady (@huda_elhady) | Hashnode"
description: "iOS Developer. Read the latest articles by huda elhady on Hashnode."
url: "https://hashnode.com/@huda_elhady"
---

@huda\_elhady

# huda elhady

@huda\_elhady · Joined April 2016

iOS Developer

### [The Function That Never Returns](https://hudaios.hashnode.dev/the-function-that-never-returns?utm_source=hashnode&utm_medium=feed)

So what is the problem? func divide(\_ a: Int, by b: Int) -> Int { if b == 0 { fatalError("b input must not be zero") } return a / b } func greeting(\_ name: String) -> String {

3 min read · [hudaios.hashnode.dev](https://hudaios.hashnode.dev/the-function-that-never-returns?utm_source=hashnode&utm_medium=feed)

[Apr 15](https://hashnode.com/posts/the-function-that-never-returns/69dede7091716f3cfb8c9d37)

### [Mutable Dictionary Keys in Swift: A Bug Waiting to Happen](https://hudaios.hashnode.dev/mutable-dictionary-keys-in-swift-a-bug-waiting-to-happen?utm_source=hashnode&utm_medium=feed)

Let's imagine we have cartItems dictionary that has product as key and number of items as value struct Product: Hashable { var id: Int var name: String } var cartItems = \[Product: Int\]() var

3 min read · [hudaios.hashnode.dev](https://hudaios.hashnode.dev/mutable-dictionary-keys-in-swift-a-bug-waiting-to-happen?utm_source=hashnode&utm_medium=feed)

[Apr 3](https://hashnode.com/posts/mutable-dictionary-keys-in-swift-a-bug-waiting-to-happen/69d05065e466e2b762b2711b)

### [Swift Performance: Stop Creating Intermediate Arrays with .lazy](https://hudaios.hashnode.dev/swift-performance-stop-creating-intermediate-arrays-with-lazy?utm_source=hashnode&utm_medium=feed)

so what happens when we write this code struct User { let name: String let isActive: Bool let avatarURL: URL } func search(query: String, in users: \[User\]) -> \[UserRow\] { Array(

2 min read · [hudaios.hashnode.dev](https://hudaios.hashnode.dev/swift-performance-stop-creating-intermediate-arrays-with-lazy?utm_source=hashnode&utm_medium=feed)

[Mar 23](https://hashnode.com/posts/swift-performance-stop-creating-intermediate-arrays-with-lazy/69c11cf0545ab963126fb6e6)

### [Swift: Copy on Write Automatic vs Manual](https://hudaios.hashnode.dev/swift-copy-on-write-automatic-vs-manual?utm_source=hashnode&utm_medium=feed)

For a long time I thought CoW happens automatically in Swift and I found that this is not entirely correctAutomatically CoW:so for array, dictionary, set, string and data it happens automatically // a

3 min read · [hudaios.hashnode.dev](https://hudaios.hashnode.dev/swift-copy-on-write-automatic-vs-manual?utm_source=hashnode&utm_medium=feed)

[Mar 7](https://hashnode.com/posts/swift-copy-on-write-automatic-vs-manual/69ac3a5486766ac3a6cb26dd)

### [Swift: High-Level Code, Zero Performance Cost](https://hudaios.hashnode.dev/swift-high-level-code-zero-performance-cost?utm_source=hashnode&utm_medium=feed)

Today I learned something new about Swift — we can write high-level elegant code with zero cost.I wanted to write a simple code that goes through array elements and multiplies each element by 2, and I

1 min read · [hudaios.hashnode.dev](https://hudaios.hashnode.dev/swift-high-level-code-zero-performance-cost?utm_source=hashnode&utm_medium=feed)

[Mar 6](https://hashnode.com/posts/swift-high-level-code-zero-performance-cost/69aaa66278c5adcd0ef317ad)
